- HadesPlutoActive particpant
- Posts : 11
Join date : 2009-09-23
Pop-up issue with Selenium RC in IE7 testing
Sat Sep 26, 2009 3:18 am
Hi guys:
I have a question regarding to pop-up window handling in Selenium RC for IE 7 automation testing.
I am running a test case with JUnit in IE
7 where there will be a pop-up window. However, the pop-up window does not
have any windowsID assigned; there is neither title nor name for it.
I have tried several methods but
I am still getting the same error message:” Error: 'pathname' is null or not
an object” or “Permission Denied” when it comes to pop-up window in RC.
The partial code is shown below:
selenium.click("xpath=//td[@id='addWidgetBtncenter']");
selenium.waitForPageToLoad("30000");
//selenium.getAllWindowIds(()
[1]);
//selenium.selectWindow(()
[1]);
selenium.selectPopUp("");
//system.threading.thread.sleep(3000);
for (int
second = 0;; second++) {
if
(second >= 60) fail("timeout");
try { if (selenium.isElementPresent("xpath=//input[@id='widgetName']")) break; } catch
(Exception e) {}
Thread.sleep(1000);
}
//System.Threading.Thread.Sleep(3000);
I have used these commands with target of the button
that triggers the pop-up window. (In this case, addWidgetBtncenter is the
button to click on for add widget)
I have placed these function commands after the action of "click the add
widget button" but before "waitforPopUp", please tell me if I am
use these commands correctly in terms of their syntax or place order. (I
have tried to place it after waitforpopup but before "selectopup", it
still doesn't give me any information in the log)
Also, I have used "windowFocus" command
then "selectFrame" or "selectpopup", but none of them
worked in IE
I am still new to Selenium/JUnit, can anyone please
help me with the correct syntax for these functions: “"storeAllWindowIds", ”storeAllWindowNames"
and "storeAllWindowTitles".” As well as the “System.Threading.Thread.Sleep(3000);”
I have been stuck in this for a while and I really
need help with it…
Any commands and suggestions are greatly appreciated!!!
Best,
Hades
I have a question regarding to pop-up window handling in Selenium RC for IE 7 automation testing.
I am running a test case with JUnit in IE
7 where there will be a pop-up window. However, the pop-up window does not
have any windowsID assigned; there is neither title nor name for it.
I have tried several methods but
I am still getting the same error message:” Error: 'pathname' is null or not
an object” or “Permission Denied” when it comes to pop-up window in RC.
The partial code is shown below:
selenium.click("xpath=//td[@id='addWidgetBtncenter']");
selenium.waitForPageToLoad("30000");
//selenium.getAllWindowIds(()
[1]);
//selenium.selectWindow(()
[1]);
selenium.selectPopUp("");
//system.threading.thread.sleep(3000);
for (int
second = 0;; second++) {
if
(second >= 60) fail("timeout");
try { if (selenium.isElementPresent("xpath=//input[@id='widgetName']")) break; } catch
(Exception e) {}
Thread.sleep(1000);
}
//System.Threading.Thread.Sleep(3000);
I have used these commands with target of the button
that triggers the pop-up window. (In this case, addWidgetBtncenter is the
button to click on for add widget)
I have placed these function commands after the action of "click the add
widget button" but before "waitforPopUp", please tell me if I am
use these commands correctly in terms of their syntax or place order. (I
have tried to place it after waitforpopup but before "selectopup", it
still doesn't give me any information in the log)
Also, I have used "windowFocus" command
then "selectFrame" or "selectpopup", but none of them
worked in IE
I am still new to Selenium/JUnit, can anyone please
help me with the correct syntax for these functions: “"storeAllWindowIds", ”storeAllWindowNames"
and "storeAllWindowTitles".” As well as the “System.Threading.Thread.Sleep(3000);”
I have been stuck in this for a while and I really
need help with it…
Any commands and suggestions are greatly appreciated!!!
Best,
Hades
Re: Pop-up issue with Selenium RC in IE7 testing
Sun Sep 27, 2009 10:32 pm
hi,
check out solution to your problem here
http://clearspace.openqa.org/message/67209#67209
best of luck
bye
check out solution to your problem here
http://clearspace.openqa.org/message/67209#67209
best of luck
bye
- HadesPlutoActive particpant
- Posts : 11
Join date : 2009-09-23
thank you
Mon Sep 28, 2009 11:38 pm
Thank you adviser, I will take a look at it
Adviser wrote:hi,
check out solution to your problem here
http://clearspace.openqa.org/message/67209#67209
best of luck
bye
- rubyjsw
- Posts : 1
Join date : 2011-06-02
I met similar problem...need help..
Thu Jun 02, 2011 3:44 pm
Have u resolve the problem?
I met similar issue as u.
I am using Selenium RC 1.0.3 + Eclipse 3.6.2. Using Selenium IDE, test suite runs rightly, then I get the java code from ide, copied to Eclipse.
I have a page with link "Monitor Groups" on it, clicking on the link will open a popup window.
The popup window is drawed by javascript:
<
..a onmouseout="return nd();" onmouseover="return overlib('Create or modify groups of related monitors', WIDTH, 300, FGCOLOR, '#d9e1ee');" href="javascript:nd();popupConfigDialog('http%3A%2F%2FEMPIRIX-B2ACF76%3A8080%2FMonitorGroups.do', POPUP_DIMENSION_WIDTH_WEB_APPLICATIONS, POPUP_DIMENSION_HEIGHT_WEB_APPLICATIONS);".>Monitor Groups<../a>
helpID = 'config_instructions';
3
4function popupConfigDialog(link, width, height) {
5 if (link.indexOf("/support") != -1) {
6 popupFull(link, "support", width, height, true, false, true, false);
7 } else {
8 popupDialog(link, "TopLevelConfiguration", window, width, height, true, true);
9 }
10}
When run to the Monitor Group part, I did not see the window open in IE7..
selenium.clickAt("link=Configure", "");
selenium.clickAt("link=Monitor Groups","");
This confused me a lot, how to make the popup window visable?
Could you provide me some help...??
Thanks very much,
Ruby
I met similar issue as u.
I am using Selenium RC 1.0.3 + Eclipse 3.6.2. Using Selenium IDE, test suite runs rightly, then I get the java code from ide, copied to Eclipse.
I have a page with link "Monitor Groups" on it, clicking on the link will open a popup window.
The popup window is drawed by javascript:
<
..a onmouseout="return nd();" onmouseover="return overlib('Create or modify groups of related monitors', WIDTH, 300, FGCOLOR, '#d9e1ee');" href="javascript:nd();popupConfigDialog('http%3A%2F%2FEMPIRIX-B2ACF76%3A8080%2FMonitorGroups.do', POPUP_DIMENSION_WIDTH_WEB_APPLICATIONS, POPUP_DIMENSION_HEIGHT_WEB_APPLICATIONS);".>Monitor Groups<../a>
helpID = 'config_instructions';
3
4function popupConfigDialog(link, width, height) {
5 if (link.indexOf("/support") != -1) {
6 popupFull(link, "support", width, height, true, false, true, false);
7 } else {
8 popupDialog(link, "TopLevelConfiguration", window, width, height, true, true);
9 }
10}
When run to the Monitor Group part, I did not see the window open in IE7..
selenium.clickAt("link=Configure", "");
selenium.clickAt("link=Monitor Groups","");
This confused me a lot, how to make the popup window visable?
Could you provide me some help...??
Thanks very much,
Ruby
Permissions in this forum:
You cannot reply to topics in this forum