I have searched extensively to solve a simple problem. I am trying to simply demonstrate Selenium IDE exercising a screen in the SmartGWT Showcase.
I must be overlooking something obvious.
Here is what I have done so far:
1) Install Selenium IDE (1.3.0) with Firefox 3.6.23. Selenium works OK for other web pages.
2) Download and unpack smartgwtee-2.5.zip.
3) Configure Selenium IDE to use the SmartGWT "user-extensions.js" file.
Also set "Selenium IDE extensions" to use the "user-extensions-ide.js" file.
4) Use Selenium IDE to record a short script on the SmartGWT EE showcase and verify that the locators look correct, e.g.
<td>click</td>
<td>scLocator=//IButton[ID="isc_IButton_1"]/</td>
<td></td>
So far, this looks good. It appears that Selenium IDE is correctly using the "user-extensions.js" to identify the components in the GUI.
However, when I playback this simple command
click scLocator=//IButton[ID="isc_IButton_1"]/
it shows the following log in Selenium IDE:
# [info] Executing: |click | scLocator=//IButton[ID="isc_IButton_1"]/ | |
# [info] Located in doScClick : scLocator=//IButton[ID="isc_IButton_1"]/
# [debug] modifyWindow seleniumMarker1319776224691:selenium1319776224694
# [debug] _getFrameElement: frameElement=null
# [debug] modifySeparateTestWindowToDetectPageLoads: already polling this window: selenium1319776224694
# [debug] modifyWindow seleniumMarker1319776224691:undefined
# [debug] _getFrameElement: frameElement=[object XPCNativeWrapper [object HTMLIFrameElement]]
# [debug] frameElement.name=
# [debug] modifySeparateTestWindowToDetectPageLoads: already polling this window: selenium1319776224704
# [debug] modifyWindow seleniumMarker1319776224691:undefined
# [debug] _getFrameElement: frameElement=[object XPCNativeWrapper [object HTMLIFrameElement]]
# [debug] frameElement.name=
# [debug] modifySeparateTestWindowToDetectPageLoads: already polling this window: selenium1319776224714
# [debug] getCurrentWindow newPageLoaded = false
# [debug] Locate Element with SC Locator=//IButton[ID="isc_IButton_1"]/, inDocument=[object XPCNativeWrapper [object HTMLDocument]], inWindow=http://www.smartclient.com/smartgwt/showcase/#featured_complete_app
# [error] Unexpected Exception: message -> autWindow is undefined, fileName -> chrome://selenium-ide/content/tools.js -> file:///C:/SmartGWT/smartgwtee-2.5/selenium/user-extensions.js, lineNumber -> 72, stack -> ("//IButton[ID=\"isc_IButton_1\"]/",[object XPCNativeWrapper],[object XPCNativeWrapper])@chrome://selenium-ide/content/tools.js -> file:///C:/SmartGWT/smartgwtee-2.5/selenium/user-extensions.js:72 ("sclocator","//IButton[ID=\"isc_IButton_1\"]/",[object XPCNativeWrapper],[object XPCNativeWrapper])@chrome://selenium-ide/content/selenium-core/scripts/selenium-browserbot.js:1295 ("sclocator","//IButton[ID=\"isc_IButton_1\"]/",[object XPCNativeWrapper],[object XPCNativeWrapper])@chrome://selenium-ide/content/selenium-core/scripts/selenium-browserbot.js:1466 ([object Object],[object XPCNativeWrapper])@chrome://selenium-ide/content/selenium-core/scripts/selenium-browserbot.js:1493 ("scLocator=//IButton[ID=\"isc_IButton_1\"]/")@chrome://selenium-ide/content/selenium-core/scripts/selenium-browserbot.js:1505 ("scLocator=//IButton[ID=\"isc_IButton_1\"]/","")@chrome://selenium-ide/content/tools.js -> file:///C:/SmartGWT/smartgwtee-2.5/selenium/user-extensions.js:119 ("scLocator=//IButton[ID=\"isc_IButton_1\"]/","")@chrome://selenium-ide/content/selenium-core/scripts/htmlutils.js:60 ([object Object],[object Object])@chrome://selenium-ide/content/selenium-core/scripts/selenium-commandhandlers.js:310 ()@chrome://selenium-ide/content/selenium-core/scripts/selenium-executionloop.js:112 (37)@chrome://selenium-ide/content/selenium-core/scripts/selenium-executionloop.js:78 (37)@chrome://selenium-ide/content/selenium-core/scripts/htmlutils.js:60 , name -> TypeError
# [debug] testComplete: failed=false
Line 72 of user-extensions.js is:
var autWindow = this.getAutWindow();
Found that getAutWindow() code fails at this statement:
// If SmartClient isn't loaded on the target window, just bail.
if (autWindow.isc == null) return;
So, it returns without defining a valid autWindow.
At this point, I do not know enough to understand what might be wrong.
I assume the SmartGWT Showcase is a SmartClient window, so I do not understand why getAutWindow fails.
Do you see anything obvious that I am overlooking?
Many thanks.
Tom Tschappler
I must be overlooking something obvious.
Here is what I have done so far:
1) Install Selenium IDE (1.3.0) with Firefox 3.6.23. Selenium works OK for other web pages.
2) Download and unpack smartgwtee-2.5.zip.
3) Configure Selenium IDE to use the SmartGWT "user-extensions.js" file.
Also set "Selenium IDE extensions" to use the "user-extensions-ide.js" file.
4) Use Selenium IDE to record a short script on the SmartGWT EE showcase and verify that the locators look correct, e.g.
<td>click</td>
<td>scLocator=//IButton[ID="isc_IButton_1"]/</td>
<td></td>
So far, this looks good. It appears that Selenium IDE is correctly using the "user-extensions.js" to identify the components in the GUI.
However, when I playback this simple command
click scLocator=//IButton[ID="isc_IButton_1"]/
it shows the following log in Selenium IDE:
# [info] Executing: |click | scLocator=//IButton[ID="isc_IButton_1"]/ | |
# [info] Located in doScClick : scLocator=//IButton[ID="isc_IButton_1"]/
# [debug] modifyWindow seleniumMarker1319776224691:selenium1319776224694
# [debug] _getFrameElement: frameElement=null
# [debug] modifySeparateTestWindowToDetectPageLoads: already polling this window: selenium1319776224694
# [debug] modifyWindow seleniumMarker1319776224691:undefined
# [debug] _getFrameElement: frameElement=[object XPCNativeWrapper [object HTMLIFrameElement]]
# [debug] frameElement.name=
# [debug] modifySeparateTestWindowToDetectPageLoads: already polling this window: selenium1319776224704
# [debug] modifyWindow seleniumMarker1319776224691:undefined
# [debug] _getFrameElement: frameElement=[object XPCNativeWrapper [object HTMLIFrameElement]]
# [debug] frameElement.name=
# [debug] modifySeparateTestWindowToDetectPageLoads: already polling this window: selenium1319776224714
# [debug] getCurrentWindow newPageLoaded = false
# [debug] Locate Element with SC Locator=//IButton[ID="isc_IButton_1"]/, inDocument=[object XPCNativeWrapper [object HTMLDocument]], inWindow=http://www.smartclient.com/smartgwt/showcase/#featured_complete_app
# [error] Unexpected Exception: message -> autWindow is undefined, fileName -> chrome://selenium-ide/content/tools.js -> file:///C:/SmartGWT/smartgwtee-2.5/selenium/user-extensions.js, lineNumber -> 72, stack -> ("//IButton[ID=\"isc_IButton_1\"]/",[object XPCNativeWrapper],[object XPCNativeWrapper])@chrome://selenium-ide/content/tools.js -> file:///C:/SmartGWT/smartgwtee-2.5/selenium/user-extensions.js:72 ("sclocator","//IButton[ID=\"isc_IButton_1\"]/",[object XPCNativeWrapper],[object XPCNativeWrapper])@chrome://selenium-ide/content/selenium-core/scripts/selenium-browserbot.js:1295 ("sclocator","//IButton[ID=\"isc_IButton_1\"]/",[object XPCNativeWrapper],[object XPCNativeWrapper])@chrome://selenium-ide/content/selenium-core/scripts/selenium-browserbot.js:1466 ([object Object],[object XPCNativeWrapper])@chrome://selenium-ide/content/selenium-core/scripts/selenium-browserbot.js:1493 ("scLocator=//IButton[ID=\"isc_IButton_1\"]/")@chrome://selenium-ide/content/selenium-core/scripts/selenium-browserbot.js:1505 ("scLocator=//IButton[ID=\"isc_IButton_1\"]/","")@chrome://selenium-ide/content/tools.js -> file:///C:/SmartGWT/smartgwtee-2.5/selenium/user-extensions.js:119 ("scLocator=//IButton[ID=\"isc_IButton_1\"]/","")@chrome://selenium-ide/content/selenium-core/scripts/htmlutils.js:60 ([object Object],[object Object])@chrome://selenium-ide/content/selenium-core/scripts/selenium-commandhandlers.js:310 ()@chrome://selenium-ide/content/selenium-core/scripts/selenium-executionloop.js:112 (37)@chrome://selenium-ide/content/selenium-core/scripts/selenium-executionloop.js:78 (37)@chrome://selenium-ide/content/selenium-core/scripts/htmlutils.js:60 , name -> TypeError
# [debug] testComplete: failed=false
Line 72 of user-extensions.js is:
var autWindow = this.getAutWindow();
Found that getAutWindow() code fails at this statement:
// If SmartClient isn't loaded on the target window, just bail.
if (autWindow.isc == null) return;
So, it returns without defining a valid autWindow.
At this point, I do not know enough to understand what might be wrong.
I assume the SmartGWT Showcase is a SmartClient window, so I do not understand why getAutWindow fails.
Do you see anything obvious that I am overlooking?
Many thanks.
Tom Tschappler
Comment