Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • mike_mac
    replied
    Ok ... having played around with this (and assuming I'm doing everything correctly - I apologise in advance if I'm not :-) ) its ALMOST brilliant ...

    You can record tests and get them to play back in the window using the selenium IDE.

    Unfortunately any IDs that are recorded seem to be only valid for the lifetime of that browser (in my application anyway). I can get it to record a bunch of clicks, launch listgrids, context menus, verify data is there ... it works great.

    But if I close the browser instance and launch it again the ids of some of the windows change. In the example above, the TreeGrid and its entrys always seem to be have the same id, the "first" ListGrid then seems to have a random number, I've seen isc_OID_44, 43, 45, 46 ...

    therefore if I try to use Selenium-RC to playback tests I've recorded in a browser window (and can see working) because a new browser instance is launched, the ids have changed and the test fails on the first ListGrid launched.

    Again, assuming I'm doing everything correctly ... anyone on smartclient side with any thoughts ? Am I doing something stupid ? Is there a way for me to set the window ids in the code in order to make them deterministic ?

    Leave a comment:


  • mike_mac
    replied
    Just realised I posted this to the wrong thread ... I put this in TechnicalQ&A when it should really be here ... also I noted Isomorphic mentioning in a previous thread that items like ListGrid and TreeGrids can't be assigned ID's so I'm at a loss to how to proceed ... the only thing I can think of is that I somehow got the jars mixed up, I'm going to copy the latest into my repository and give it another go ... anyone else have any better luck ?

    Originally posted by mike_mac
    Hi Guys ...
    Not to high jack this thread but I think I may have a related/similar problem.

    I've been trying to do a simple test that:
    logins,
    picks an item from a TreeGrid which launches a ListGrid
    clicks an item in the ListGrid

    I was getting the stages of the above with the final step failing and I couldn't figure out why. Then I went back to basics and tried to start again from scratch and I found that the ID's on the TreeGrid and ListGrid had changed. I hadn't redeployed, the only code I changed was the test case. Is this something I'm doing incorrectly or this expected behaviour that we need to work around ? How are these names generated ? Can they be predictable ?

    First time I ran the IDE it recorded this
    Code:
             
            selenium.click("scLocator=//TreeGrid[ID=\"isc_OID_22\"]/body/row[0]/col[fieldName=nodeTitle||0]");
            selenium.click("scLocator=//ListGrid[ID=\"isc_OID_46\"]/body/row[name=Acme||0]/col[fieldName=name||0]");
    Second time I ran the IDE it recorded this
    Code:
             
            selenium.click("scLocator=//TreeGrid[ID=\"isc_OID_28\"]/body/row[0]/col[fieldName=nodeTitle||0]");
            selenium.click("scLocator=//ListGrid[ID=\"isc_OID_70\"]/body/row[name=Acme||0]/col[fieldName=name||0]");
    the trace on the selenium server is ...
    Code:
    20:27:36.246 INFO - Command request: click[scLocator=//ListGrid[ID="isc_OID_70"]
    /body/row[name=Acme||0]/col[fieldName=name||0], ] on session c10675668dfc456f9c8
    3ca0282c3483b
    20:27:41.277 INFO - Got result: ERROR: Element scLocator=//ListGrid[ID="isc_OID_
    70"]/body/row[name=Acme||0]/col[fieldName=name||0] not found on session c1067566
    8dfc456f9c83ca0282c3483b

    Leave a comment:


  • karl_garcia
    replied
    ttubbs, the pioneering spirit.. how did it go? :)

    Leave a comment:


  • ttubbs
    replied
    Not sure how to tell what version it is. I have a snapshot from 4/13 though, so I'll update again and see how things go tomorrow.

    Leave a comment:


  • Isomorphic
    replied
    If you're not running the latest nightly (eg maybe you are working with 7.0), you need to be running the latest nightly.

    If you are running the latest nightly, we need a runnable test case.

    Leave a comment:


  • ttubbs
    replied
    Any Tips and Tricks to share?

    Gave the tool a try, and am not getting a good feeling so far. I was able to get through a login screen ok. My second page has a master/detail design using a ListGrid / Pair of Dynamic Forms where the grid is the master and the pair of forms are the details , one for read only and one for doing edits. User selects a rown in the list, and the detailed info. shows in the read only form. A button on the read only (edit) will hide the read only form and show the editable form for edits. A submit button on the edit form (commit) saves the changes and toggles the forms back to read only.

    My findings:
    - 1st playback, proper row is selected, edit opens, edits to form are applied, and commit button shows as focused. *BUT* the click of the button does not appear to hit my server or toggle the forms back. Selenium shows it as green though.

    - Subsequent playbacks, unless I manually move focus out of the grid, it will *NOT* select the desired row.

    - During recording, a couple of lines were recorded that said "scLocator =" with no values. On playback these cause the playback to fail.

    My recorded test, cleaned up to run is included below. Besides that, was wondering if there were any tips or tricks Isomorphic or others have found.
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head profile="http://selenium-ide.openqa.org/profiles/test-case">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="selenium.base" href="" />
    <title>EditEmployee</title>
    </head>
    <body>
    <table cellpadding="1" cellspacing="1" border="1">
    <thead>
    <tr><td rowspan="1" colspan="3">EditEmployee</td></tr>
    </thead><tbody>
    <tr>
    	<td>click</td>
    	<td>scLocator=//ListGrid[ID=&quot;employeeGrid&quot;]/body/row[employeeId=5413||firstName=Little%20Bill||4]/col[fieldName=firstName||0]</td>
    	<td></td>
    </tr>
    <tr>
    	<td>click</td>
    	<td>scLocator=//EmployeeForm[ID=&quot;employeeForm&quot;]/item[name=edit||title=Edit%20Employee||index=24||Class=SubmitItem]/canvas/</td>
    	<td></td>
    </tr>
    <tr>
    	<td>click</td>
    	<td>scLocator=//EmployeeFormEdit[ID=&quot;employeeFormEdit&quot;]/item[name=zip||title=ZipCode||value=12345||index=10||Class=TextItem]/element</td>
    	<td></td>
    </tr>
    <tr>
    	<td>type</td>
    	<td>scLocator=//EmployeeFormEdit[ID=&quot;employeeFormEdit&quot;]/item[name=zip||title=ZipCode||value=54321||index=10||Class=TextItem]/element</td>
    	<td>42424</td>
    </tr>
    <tr>
    	<td>click</td>
    	<td>scLocator=//EmployeeFormEdit[ID=&quot;employeeFormEdit&quot;]/item[name=commit||title=Commit%20Changes||index=21||Class=SubmitItem]/canvas/</td>
    	<td></td>
    </tr>
    <tr>
    	<td>click</td>
    	<td>scLocator=//EmployeeFormEdit[ID=&quot;employeeFormEdit&quot;]/item[name=commit||title=Commit%20Changes||index=21||Class=SubmitItem]/canvas/</td>
    	<td></td>
    </tr>
    </tbody></table>
    </body>
    </html>

    Leave a comment:


  • taxaw
    replied
    Thanks Sanjiv

    Thanks for all your work.

    Leave a comment:


  • sjivan
    replied
    Selenium support has been added to Smart GWT and SmartClient. The user guide and Selenium extensions can be found under the "selenium" subdirectory in the SmartGWT distribution zip file and under smartclientSDK/tools/selenium in the SmartClient distribution. Until the next official release is out you can pick it up from the nightly builds.

    Sanjiv

    Leave a comment:


  • Isomorphic
    replied
    No need to repeatedly post about this. If it's important for your company, just sponsor the work.

    Leave a comment:


  • taxaw
    replied
    Roadmap ?

    I have a project which will start in on month and i want to buy for my company the smartgwt EE pro License.
    Can you please tell me in when will the selenium compatibility come ?
    Thank you

    Leave a comment:


  • mtaal
    replied
    Hi,
    As this is an open question for me to, bumping it up also....

    gr. Martin

    Leave a comment:


  • claudiobosticco
    replied
    bump: any updates?

    Leave a comment:


  • taxaw
    replied
    What about QA ?

    What about QA with automatic funtional testing ?
    This doesnt seem to interest many people in this area.
    Even Extjs/extgwt is compatible with Selenium and it's a serious concurrent of SmartGWT.
    I thing that, We, community of SmartGWT, must pay attention to the fact that Selenium is going to be widely used if it's still not. And Quality is being a leitmotiv for many company.
    So If extjs/extgwt has less functionality than SmartGwt but allows people to be more compliant with QA, they will use it instead of using SmartGWT.
    So let's pay attention to that.

    http://forums.smartclient.com/showthread.php?t=3264
    Last edited by taxaw; 16 Apr 2009, 02:28.

    Leave a comment:


  • taxaw
    replied
    Selenium

    Selenium is very impressive and offer so much functional testing tools (cubitest, selenium grid, ...) whitch make it UNIQUE in the open source world !
    Please take a look at it.

    Leave a comment:


  • taxaw
    replied
    Up

    Is Selenium still not compatible ?
    Thanks.

    Leave a comment:

Working...
X