mde / flex-pilot Goto Github PK
View Code? Open in Web Editor NEWTesting automation library for Flex and Flash.
Testing automation library for Flex and Flash.
Flex Pilot A library for doing easy testing automation of Flash and Flex applications. Includes a locator/lookup mechanism, eventing, and an AS3 test-runner.
Swiz has a BaseMetadataProcessor (BMP) class which creates elements from metadata.
The app I'm working in leverages this construct - passing in a bunch of name/value pairs and letting the BMP construct and display ui elements. In this case the elements are similar to modal windows.
So far i have been unable to successfully click a child button w/i one of these dynamically constructed elements.
Is it possible that Flex Pilot is unaware of their 'automationName' prop/val because the elements do not exist upon the application's creationComplete?
My tests are written in ruby and leverage javascript.
I've tried accessing the infoButton by chain @driver.execute_script("document.App.fp_click({chain:'name:ImageEditingContextualMenu2147/name:ImageEditingContextualMenuSkin2148/id:contextualMenuWrapper/name:ContextualMenuSkin2150/id:contentGroup/id:contentGroup/automationName:infoButton'})")
and by automationName
@driver.execute_script("document.App.fp_click({automationName:'infoButton'})")
Any insight or workaround would be greatly appreciated.
Thanks
i'm trying to get rid of these pesky 'sleep(n)' and use wait instead, but can't get it to work.
any ideas?
require "rubygems"
require "selenium-webdriver"
require "test/unit"
class SmokeTest < Test::Unit::TestCase
def setup
@driver = Selenium::WebDriver.for :firefox
@wait = Selenium::WebDriver::Wait.new(:timeout => 30)
@verification_errors = []
end
def test1
@driver.get "http://myFlexApp.com/index.html"
# sleep(26)
element = @wait.until( assert_equal("Loaded",@driver.execute_script("document.FlexApp.fp_getPropertyValue({id:'titleLabel',attrName:'text'})"))
p('app elements loaded')
end
def test2
@driver.get "http://myFlexApp.com/index.html"
element = @wait.until( @driver.execute_script("document.FlexApp.fp_assertDisplayObject({automationName:'titleLabel'})") ) )
p('app elements loaded')
end
end
I'm beginning to suspect that wait only works with driver.find_element().
any help is appreciated!
Hi!
Flex-Pilot and Robot Framework with Selenium library is great combination, but I found bug from type functionality.
Spark TextInput (which extends SkinnableTextBase) dispatch TextOperationEvent.CHANGE after edit completed, but currently flex-pilot don't dispatch it.
Event is documented in SkinnableTextBase source:
/**
I want know a way to capture flex objects contain in different swfs at once. In my application, it contains two swfs and i want to automate my testing using both swfs, is there any method that i can follow...
I need suggessions...thanks
I can't get any commands to work on any elements in a Pop-up. I've tried setting automationNames to various object in it and even to the Pop-Up itself, but it always fails to locate the element. Any idea what's causing this?
getting the following error when calling the function function select(params:Object) using a label=newvalue
TypeError: Error #1034: Type Coercion failed: cannot convert org.flex_pilot.events::FPListEvent@15476fc9 to spark.events.IndexChangeEvent.
this occurs when the code is on this line
if (sel[labelField] != targetLabel) {
Events.triggerListEvent(obj, ListEvent.CHANGE);
on the function select(params:Object) (FPController.as)
complete stack
TypeError: Error #1034: Type Coercion failed: cannot convert org.flex_pilot.events::FPListEvent@15476fc9 to spark.events.IndexChangeEvent.
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.core::UIComponent/dispatchEvent()
at org.flex_pilot.events::Events$/triggerListEvent()[E:\Source\xx\Flex\xx\src\org\flex_pilot\events\Events.as:182]
at org.flex_pilot::FPController$/select()[E:\Source\xx\Flex\xx\src\org\flex_pilot\FPController.as:496]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at Function/()[E:\Source\xx\Flex\xx\src\org\flex_pilot\FlexPilot.as:138]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at flash.external::ExternalInterface$/_callIn()
at Function/()
any idea on how to select an item using this element?
Apparently the flex pilot IDE extension doesn't function within iframes.
If I extract the movie outside the iframe, by opening it within a separate
browser, the IDE picks up components...
Failure to activate flex movie: id=[project name]
Error in selenium IDE.
plz give solution ..Thanks in advance
How Can I click on TabNavigator??
<mx:TabNavigator id="mainSs" width="100%" height="100%" paddingTop="0" historyManagementEnabled="false" tabHeight="26">
<view:EditView label="Search/Edit Record" id="edit" user="{model_Me.user_name}"/>
<view:UploadView label="Upload File" id="upload" enabled="{model.user.userInRoleForApp( 'RAP', 'UPLOAD' )}" user="{model_Me.user_name}"
uploadErrors="{model_Me.uploadErrors_found}"/>
/mx:TabNavigator
I am trying the following, But, not working.
((JavascriptExecutor) webDriver).executeScript("document.getElementById('"+flashObjectId+"').fp_click({
id:'mainSs', label:'Upload File'})");
OR
((JavascriptExecutor) webDriver).executeScript("document.getElementById('"+flashObjectId+"').fp_click({
id:'mainSs', id:'upload'})");
So, Can u help Please??
Hello
How Can I read/get a textfield?
for example, in Flex_Selenium_API, we can get the textfield:
public String getText(String textFieldId) {
return call("getFlexText", textFieldId, "");
}
How can we do it with flexPilot???
I looked at the API, and it has fp_click , fp_type , fp_select ,fp_doubleClick, fp_dragDropElemToElem, fp_dragDropToCoords,
fp_lookupFlash .
there is No fp_get OR fp_read.
Can u help please?
thanks
How to put flex-pilot related files in a Flex project pom.xml to build using maven.
I've a sample project which build xml called "pom.xml" and i want to know where to put neccessary code in it.
Hi,
I am doing Flex Automation Project.
I am using Flex Pilot with Robot Framework and Selenium, At some extend I am successful on Flex Automation but I got stuck at Fly Out Elements, I am not able to click on on the fly element. I would really appreciate if somebody helps me to resolve this issue.
Thanks and Regards,
Abhijit Valvekar
so i'm able to execute this javascript from the firebug console against my app, w/ flexpilot in place, and receive the expected response of "Howdy"
document.getElementById('FlexPilotSample').fp_getPropertyValue({id:'howdyButton',attrName:'label'})
but when i pull this into my ruby test the same javascript statement returns and my assertion fails
assert_equal(@driver.execute_script("document.getElementById('FlexPilotSample').fp_getPropertyValue({id:'howdyButton',attrName:'label'})"), "Howdy")
other scripts from ruby work as expected
@driver.execute_script("document.getElementById('FlexPilotSample').fp_click({id:'howdyButton'})")
@driver.execute_script("document.getElementById('FlexPilotSample').fp_check({id:'howdyButton'})")
any ideas?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.