Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] SWT Browser Web Automation Framework: no timeouts, mouse click in IE/Windows, disable confirmation popups

Dear All:

Just as a reminder, I am developing an EPL v1.0 framework in the style of WebDriver. Available for download
http://code.google.com/p/selenium/wiki/GettingStarted
(this is "stable" version) at www.mkosh.com

The _key difference_: this framework, based on SWT Browser object, works with the browser window _hidden_

This is my 3rd (4th?) release. It is still Javascript based, but I have added support for following:
* conformance tests that test various behavior. I have specifically found one bug in the Browser object (cross-platform)
reported here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=314031
* there are no timeouts anymore. My simple strategy:
a) wait for ProgressListener.completed
b) record document.getElementsByTagName('*').length
c) wait two seconds
d) repeat (b)
e) if (d) and (b) differ, goto (b). Otherwise, we're done.
This seems to work well.
* One of the conformance tests (see org.eclipse.swt.browser.test.JavascriptEvents) simulates a mouse click, records the (Javascript) events, then
replays them. I have found that having the event.button property is key for Internet Explorer to correctly simulate a mouse click in _all_ cases.
* Additionally, I block confirmation pop ups in the new "Google Voice Empty Trash" tester application. This is quite easy to do (comes from a WebDriver forum - my apologies I do not have exact link):
		((JavascriptExecutor)driver).executeScript("window.confirm=function(msg) { return true; };");

On the way:
* Already have support for XPath/full DOM tree on local version that works
* Simulation of keyboard events so I can reproduce second example from
http://code.google.com/p/selenium/wiki/GettingStarted
* I will probably not re-write the tester/Firebug like application that was included in the unstable version.
* JavaDocs - although the key of having a WebDriver-like interface is that the API is already set and clearly documented
http://selenium.googlecode.com/svn/trunk/docs/api/java/index.html
(although I admit I am implementing a rather small subset).

Any other ideas/suggestions/comments?

Please reply all.

Thank you
Misha


Back to the top