20 May 2008 2:05 AM #1
Testing Ext js application with Selenium RC
Can anyone tell me, how to get the ID from data store / source to test with Selenium RC. Is this possible for acceptance testing with ext js thru selenium RC
21 May 2008 12:35 PM #2
storeEval( 'selenium.page().currentWindow.Path.To.Your.DataStore.id', 'storeId' )
To use the value in a Selenium command (i think, its been awhile):
type( someInputElement, "My data store Id is $storeId" )
2 Jun 2008 11:06 PM #3
But i am using phpunit for UI test, when i use firefox selenium IDE, its generating id's randomly for the drop down list click event... mainly the ID changes every time.. because its from data store to the drop downlist...
Please look at the sample below.... and let me know how to handle this...
20 Jun 2008 7:11 AM #4
If you are using EXTJS, when you record a random id will be generated, which keeps change each every time, so we have to use XPath, for the extjs elements, to find the Xpath there are 2 Firefox add on, one is firebug and Xpather,
4 Mar 2009 7:35 PM #5
How we test Ext from Java with Selenium
I just wrote an article on how I've been testing an ExtJS GUI in Java at:
Primarily, it describes how I got around having to assign hand-crafted IDs to all the Ext components, and also a little bit on sychronising the tests with AJAX. It's a work in progress, and any comments or requests for clarification are welcome.
24 May 2011 11:20 AM #6
22 Dec 2011 4:18 PM #7
22 Dec 2011 10:30 PM #8
3 Jan 2012 6:23 AM #9
i believe that i release it in the next two weeks.
we are testing it on our system and it is look fine.
if you you want the code as, is please let me know
12 Sep 2012 5:34 AM #10
You may want to look at RIATest.
Version 5.0 fully supports ExtJS testing. ExtJS UI widgets are first class citizen in RIATest. This means that unlike other HTML testing tools you do not need to struggle with dynamic ids. The tests in RIATest operate in terms of ExtJS UI widgets.
Examples of RIATest scripts that work with ExtJS widgets:
The following clicks on an ExtJS button with label "Next Page":
ExtRow("Controller.js")=>dragAndDropTo(ExtTreePanel("#tree2")->ExtRow("Custom Ext JS"));
RIATest also knows when to automatically wait for ExtJS AJAX to finish, so if your UI does dynamic content downloading the tests will auto-magically wait until data is received from server.
(Disclaimer: I am a RIATest team member).