|
#21
|
|||
|
|||
|
Good to know. Thanks for the tip.
As I get time, I might dig into this more. I'm new to these tools, so I don't even know at this point how to get any js other than the user-extentions.js plugged into the testing framework. I'll be sure to update this list if/when I make any progress on this. No promises though. TT |
|
#22
|
|||
|
|||
|
Note that the functionality in AutoTest.js is already present in ISC_Core.js, at least for smartclientSDK (as opposed to smartclientRuntime).
|
|
#23
|
|||
|
|||
|
Also good to know. Not sure how that helps at this point. It seems Selenium is running in one window/frame and my app in another. SmartClient libraries are not available in Selenium (where I need to make use of AutoTest), and I cannot find a way to load them there. So, I think it is ugly, but I can expose my app's global object like I said before so that in user-extentions.js I can do something like this:
Code:
BUT, If you could provide a bit more details on how to use AutoTest, it would be very helpful. Consider... In the user-extentions.js I uploaded previously: Code:
But, I am guessing you are suggesting doing code like the following instead? Code:
Last edited by ttubbs : 27th Oct 2009 at 07:33. |
|
#24
|
|||
|
|||
|
bump bump bump
|
|
#25
|
|||
|
|||
|
Quote:
I don'nt have enough skill in Javascript but i'm going to improve my knowledge in order to make Smartgwt compliant to selenium, if possible. Where can we download or have documentation on autoTest.js ? For the user-extentions.js file, what version of selenium do you use ? I need to have the same environnement than you so i can participate. Thank you. |
|
#26
|
|||
|
|||
|
AutoTest.js is inside the LGPL version of SmartClient
I downloaded selenium-remote-control-1.0.1-dist.zip. I am just not able to click on an element using my current setup (FitNesse, WebTest, Selenium RC, SmartClient). I experimented with the stuff in AutoTest, and did make some progress, but it is SmartClient specific code that I don't really like needing to do. (Finding eventproxy or looping up parentElements to find a subcomponent such as the close button on a window). Just ugly code. I should be able to send a click event to an element on the page just as if I am clicking the mouse there. I've put traces in my Selenium user-extentions.js, and can see that the same elements I click with the mouse are being sent a click event as well. The app just sits there and doesn't do a thing. Another guy on the team has been working with Googles WebRunner (which looks to use Selenium under the covers, thought he inports are not the same package names). He is able to get a button or grid cell element (both <td>s) send them a click() message, and the app responds as expected. He's using this to run JUnit tests. I don't know what Voodoo is being done in WebRunner that makes a click on the same dang elements work there but not for me in WebTest/Selenium RC. I guess I'll have to see if WebRunner source is available and see what they are doing in their click method. It seems SmartClient triggers alot of stuff off of mouseUp instead of click, so maybe something to explore there. |
|
#27
|
|||
|
|||
|
AutoTest.js has two very very simple, elegant APIs you should use, the previously mentioned getLocator(element) and getElement(locator). All of the rest is internal concerns of the framework, that's the whole point.
If Selenium takes shortcuts and does not simulate a true click (mouseDown, mouseUp, click) then yes most SmartClient elements will not respond to that. So that may well be the problem. Perhaps you can find a setting to enable true event series to be sent. |
|
#28
|
|||
|
|||
|
First, I lied. The Google product is called WebDriver (not WebRunner).
Second, it seems that there has been some chatter on OpenQA for over a year about merging WebDriver and Selenium. I cannot find that this has happened yet. However, there is something called SpiderFixture, a WebDriver backed fixture for FitNesse (which is what I am mostly interested in). I plan to explore that combo some to see if it makes things easier going. As a test, I intercepted the 'click' event in my user-extentions.js fiile, and manually sent a 'mousedown', 'mouseup', and 'click'. This did improve things slightly, it made my button show in a focused and selected state. However, the click still did not process. I've attached my latest user-extensions.js for any who care. |
|
#29
|
|||
|
|||
|
I have had some success today using a different mix of tools:
FitNesse, FitLibrary, FitLibraryWeb (SpiderFixture), WebDriver After much trial and error (the docs are not so good for a newbie), I have been able to get something to click in my SmartClient app. I downloaded the latest libraries listed above. The SpiderFixture is backed by WebDriver, and since we had success with that in JUnit, I thought I'd give it a try for FitNesse. It did not process the click as I expected it would. Again, after much trial and error, I discovered that the version of WebDriver packaged with FitLibraryWeb is older than the one we are using in the JUnit tests. I copied over the newer version into my FitNesse lib folder, and like magic I can click on elements. At this point, I think I am going to explore with this set of tools and leave off where I was with the Selenium stuff. But, I've got a new assignment that is going to keep me out of testing for a few weeks to a month. I'll be sure to provide any updates in the future should I have any more to give. Thanks & Good Luck All, TT |
|
#30
|
|||
|
|||
|
Yeah it would be great if we had a setID with each selenium widget.
Do we have a way to trap buttonItem. Precisely I want to click a buttonITem widget. I wasnt also able to get a handle to the form element even after setting the ID tag. Any help would eb really appreciated |