1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    2
    Vote Rating
    0
    Bharathiraja is on a distinguished road

      0  

    Question Testing Ext js application with Selenium RC

    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

  2. #2
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    70
    Vote Rating
    0
    CableDawg is on a distinguished road

      0  

    Default


    Try:

    Code:
    storeEval( 'selenium.page().currentWindow.Path.To.Your.DataStore.id', 'storeId' )
    That will evalulate the JS line and store it into the Selenium variable 'storeId' or whatever you want to use.

    To use the value in a Selenium command (i think, its been awhile):

    Code:
    type( someInputElement, "My data store Id is $storeId" )
    or if using Javacript:

    Code:
    type( someInputElement, javascript{"My data store Id is " + storedVars['storeId']} )

  3. #3
    Ext User
    Join Date
    Apr 2008
    Posts
    2
    Vote Rating
    0
    Bharathiraja is on a distinguished road

      0  

    Default


    Thanks CableDawg

    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...

    $this->click("ext-gen372");

  4. #4
    Ext User
    Join Date
    Jun 2008
    Posts
    1
    Vote Rating
    0
    faisssal is on a distinguished road

      0  

    Default


    hi

    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,

    thanks

    -- Faisal

  5. #5
    Ext User
    Join Date
    Jul 2008
    Location
    Auckland, New Zealand
    Posts
    3
    Vote Rating
    0
    alphanerd is on a distinguished road

      0  

    Default How we test Ext from Java with Selenium

    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:

    http://www.neocoders.com/portal/arti...nium-and-extjs

    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.

    cheers,
    Lindsay

  6. #6
    Sencha User
    Join Date
    Apr 2009
    Posts
    37
    Vote Rating
    0
    apleshkov is on a distinguished road

      0  

    Default


    Quote Originally Posted by alphanerd View Post
    I just wrote an article on how I've been testing an ExtJS GUI in Java at:

    http://www.neocoders.com/portal/arti...nium-and-extjs

    ...
    Currently it doesn't work:
    The page cannot be found
    I realize it was so long ago, but can I still hope to see your article?

  7. #7

  8. #8
    Sencha User
    Join Date
    Apr 2009
    Posts
    37
    Vote Rating
    0
    apleshkov is on a distinguished road

      0  

    Default


    @simbal thanks!

  9. #9
    Sencha User
    Join Date
    Jan 2009
    Posts
    8
    Vote Rating
    0
    simbal is on a distinguished road

      0  

    Default


    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

  10. #10
    Sencha User
    Join Date
    Sep 2012
    Posts
    4
    Vote Rating
    0
    tnm is on a distinguished road

      0  

    Default


    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":

    PHP Code:
    ExtButton("Next Page")=>click(); 
    And the following does drag-n-drop of a row from one ExtJS tree to another:

    PHP Code:
    ExtRow("Controller.js")=>dragAndDropTo(ExtTreePanel("#tree2")->ExtRow("Custom Ext JS")); 
    And this collapses the header of an ExtJS box:

    PHP Code:
    ExtBox("Feeds")->ExtHeader("Feeds–í")->ExtCollapser()=>click(); 
    (All sample code above is from real test scripts that run on ExtJS sample applications).



    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).