Selenium doesn't recognize my new window.
The new window is created by submit a form with target="uploadWindow".
All I know is use "selectWindow" to operate on the new window.
The script recorded by selenium IDE:
click link=Upload CSV
selectWindow name=uploadWindow
But it says cannot find the window when replay the script.
I tried selenium RC, and the result is the same.
And then I tried to use "all_window_names" in selenium-RC to see
whether the name is right, but the new window is not listed.
Above is done on Firefox.
Any idea or workaround?
HTH.
This is a very good blog about handling popup message. Go through it.
You should be able to solve your problem. If not then let me know.
http://qtp-help.blogspot.com/2009/07/selenium-handling-windows.html#comment-form
You need to focus the new window, first try to find out name of new
window using selenium IDE (for this just record anything from new
window) then use bellow code
selenium.click(locator);
selenium.selectWindow("window name");
selenium.windowFocus();
Thanks
Ritesh
Hopes it helps people encounters the similar problem.
Does this solution works for pop-up windows? In HTTPs a security
warning pop-window is opening and is not recognised by selenium IDE.
I tried the solution given but still not working.
pop-up security warning contains with two buttons Continue and Cancel:
" Although this page is encrypted, the information you have entered is
to be sent over an unencrypted connection and could easily be read by
a third party.
Are you sure you want to continue sending this information?"
Could you please help me on what am i doing wrong. I tried like this
selenium.openWindow("", "Security Warning");
selenium.selectWindow("Security Warning");
selenium.click("Continue");
Thanks in advance
Rama
> > > Any idea or workaround?- Hide quoted text -
>
> - Show quoted text -
do we need to specify the window id in selenium.openWindow() or can i
use window title also?
bcoz your solution is not working for me.
i click a button on the parent window and it opens a new window which
does not have windowid but have a title only.
please tell what can be the solution in this case. and moreover i was
not able to open a new window with no URL specified in
selenium.openWindow();
it does not take any action.
please help.
On Mar 11, 10:27 am, Friendkey <friend...@gmail.com> wrote:
> Thank you all. I worked it out!
> Thewindowname is right, it'sselenium'sfault. It seems thatseleniumdoesn't know thewindowopened by my web page. It can only
> recognizewindowopened by itself.
> So the workaround is:
> 1. open awindowbyseleniumwith the same name as the targetnewwindow, for example:selenium.openWindow('', 'MyWindow')
> 2. click button (byselenium) to open thenewwindow, for example:selenium.click(locator)
> comment: thewindowname is "MyWindow" (same as previous).
> Firefox won't open anewwindow, but use thewindowopened by last
> step
> 3. now, selectWindow is able to recognize "MyWindow"
>
> Hopes it helps people encounters the similar problem.
>
> On Mar 10, 3:54 pm, Ritesh <riteshsgs...@gmail.com> wrote:
>
>
>
> > Hi,
>
> > You need to focus thenewwindow, first try to find out name ofnew
> >windowusingseleniumIDE (for this just record anything fromnew
> >window) then use bellow code
>
> >selenium.click(locator);
> >selenium.selectWindow("windowname");
> >selenium.windowFocus();
>
> > Thanks
> > Ritesh
>
> > On Mar 8, 7:58 am, Friendkey <friend...@gmail.com> wrote:
>
> > > Hi,
>
> > >Seleniumdoesn't recognize mynewwindow.
> > > Thenewwindowis created by submit a form with target="uploadWindow".
> > > All I know is use "selectWindow" to operate on thenewwindow.
> > > The script recorded byseleniumIDE:
>
> > > click link=Upload CSV
> > > selectWindow name=uploadWindow
>
> > > But it says cannot find thewindowwhen replay the script.
>
> > > I triedseleniumRC, and the result is the same.
> > > And then I tried to use "all_window_names" inselenium-RC to see
> > > whether the name is right, but thenewwindowisnotlisted.
>
> > > Above is done on Firefox.
>