pop-up issue with Selenium RC in IE7 testing

View: New views
1 Messages — Rating Filter:   Alert me  

pop-up issue with Selenium RC in IE7 testing

by Hades_Pluto :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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);”

Here is the Failure Trace:
 
Here is another warming but I don’t think it matters in this case; it is associated with the code:
import java.util.regex.Pattern;    
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