Problem to get instance of org.eclipse.swt.WidgetManager [message #657699] |
Thu, 03 March 2011 16:34 |
Christian A Messages: 13 Registered: March 2011 |
Junior Member |
|
|
Im trying to test a RAP application with selenium.
To obtain information about the state of UI widgets, i will access the
org.eclipse.swt.WidgetManager to retrieve widgets by their id.
In the user-extensions-qooxdoo.js file i added the following function:
Selenium.prototype.getWidgetById = function(locator){
var uwindow = this.browserbot.getUserWindow();
var wmanager = uwindow.org.eclipse.swt.WidgetManager.getInstance();
// obtain reference to widget
widget = wmanager.findWidgetById(locator);
return widget != null;
}
In selenium IDE the following exception is thrown:
[error] Unexpected Exception: message -> wmanager.findWidgetById(locator) is undefined, fileName -> chrome://selenium-ide/content/tools.js -> file:///C:/iDARE.WEST/rap_UITest/scripts/user-extensions-qoo xdoo.js, lineNumber -> 115, stack -> ("userEmailTxt","")@chrome://selenium-ide/content/tools.js -> file:///C:/iDARE.WEST/rap_UITest/scripts/user-extensions-qoo xdoo.js:115 ("userEmailTxt","" )@chrome://selenium-ide/content/selenium/scripts/htmlutils.j s:60 ([object Object],[object Object])@chrome://selenium-ide/content/selenium/scripts/sele nium-commandhandlers.js:330 ()@chrome://selenium-ide/content/selenium/scripts/selenium-e xecutionloop.js:112 (1)@chrome://selenium-ide/content/selenium/scripts/selenium- executionloop.js:78 (1)@chrome://selenium-ide/content/selenium/scripts/htmlutils .js:60 , name -> TypeError
I also tried to get the WidgetManager directly using 'var wmanager = org.eclipse.swt.WidgetManager.getInstance()'. In this case a similar exception 'org is undefined' appeared. If i change 'this.browserbot.getUserWindow' in 'this.browserbot.getCurrentWindow' an exception 'getCurrentWindow().org is undefined' is thrown.
Has anybody an idea, how i can fix it?
Thanks in advance
[Updated on: Thu, 03 March 2011 16:40] Report message to a moderator
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03237 seconds