Announcement

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

    #16
    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

    Comment


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

      Comment


        #18
        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

        Comment


          #19
          Thanks Sanjiv

          Thanks for all your work.

          Comment


            #20
            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>

            Comment


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

              Comment


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

                Comment


                  #23
                  ttubbs, the pioneering spirit.. how did it go? :)

                  Comment


                    #24
                    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

                    Comment


                      #25
                      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 ?

                      Comment


                        #26
                        Originally posted by mike_mac

                        But if I close the browser instance and launch it again the ids of some of the windows change.
                        Just to be clear ... I mean if I close the browser application and relaunch (which is what selenium RC does) the ids change.

                        Comment


                          #27
                          You can setID() to create stable IDs, and if you are using the AutoChild pattern, often a single ID is enough for the whole application to take on unique IDs.

                          Comment


                            #28
                            Originally posted by Isomorphic
                            You can setID() to create stable IDs, and if you are using the AutoChild pattern, often a single ID is enough for the whole application to take on unique IDs.
                            Mea Culpa ... I got confused with by this post
                            http://forums.smartclient.com/showpost.php?p=24264&postcount=11
                            Need to speed read at slightly less speed :-)

                            Thanks, I'll give it a go. I'm not entirely certain what the AutoChild pattern is but I see from one of your other posts that you'll be adding it to SmartGWT soon so I'll keep an eye open. In the meantime we'll try and come up with a our own naming scheme that makes sense.

                            Thanks !

                            Comment


                              #29
                              so am I reading this right.. without access to edit the UI's SmartClient code.. we cannot test this since the IDs are an issue?

                              Currently I can't modify the code to the UI, so I'm SOL 'til the IDs can be done the right way where it does not change, using setID ?

                              Comment


                                #30
                                The auto-generated IDs are stable from run to run unless you do something like create components from a series of network requests that can complete in any order. In this case obviously it's not possible for the framework to guarantee stable, auto-generated IDs, so you need to either ensure your requests are ordered, or add your own IDs.

                                Comment

                                Working...
                                X