Html popup window: How to keep control over popup

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Html popup window: How to keep control over popup

GW-5
Hello,

I have following line of code:

"<button id="btnChangeSecurityCode" name="btnChangeSecurityCode" type="button" value="btnChangeSecurityCode" onclick="openWindow('change_security_code.php', 370, 380) ">Change Code</button>"

I use clickAndwait and the id to open the popup window. However then I do not know how to access it. Any idea?

Thanks
Bernd Paatsch
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1013&messageID=2836#2836

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Html popup window: How to keep control over popup

GW-5
Use the window.open and be sure to specify an id for the window which is the second parameter.  More info here: http://www.w3schools.com/htmldom/met_win_open.asp

<button
      id="btnChangeSecurityCode"
      name="btnChangeSecurityCode"
      type="button"
      value="btnChangeSecurityCode"
      onclick="window.open('change_security_code.php', 'changeSecCode',370, 380) ">Change Code</button>

<tr>
    <td>selectWindow</td>
    <td>changeSecCode</td>
    <td></td>
</tr>

You can find the reference here: http://www.openqa.org/selenium/seleniumReference.html

Hope this helps.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1013&messageID=2838#2838

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Html popup window: How to keep control over popup

GW-5
To select the main window again do this

<tr>
<td>selectWindow</td>
<td>null</td>
<td></td>
</tr>
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=1013&messageID=2840#2840

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Html popup window: How to keep control over popup

jamesnot007
In reply to this post by GW-5
Can you paste the code of function "openWindow"?

if there is any code like"window.open(url,name,...)"in your function
"openWindow"

you can use the test script below to select the popup and test the controls
in popup selected like doing in the parent window.

|selectWindow|name||

James.
----- Original Message -----
From: "Bernd" <[hidden email]>
To: <[hidden email]>
Sent: Friday, January 13, 2006 5:29 AM
Subject: [selenium-users] Html popup window: How to keep control over popup


> Hello,
>
> I have following line of code:
>
> "<button id="btnChangeSecurityCode" name="btnChangeSecurityCode"
type="button" value="btnChangeSecurityCode"
onclick="openWindow('change_security_code.php', 370, 380) ">Change
Code</button>"
>
> I use clickAndwait and the id to open the popup window. However then I do
not know how to access it. Any idea?

>
> Thanks
> Bernd Paatsch
> ---------------------------------------------------------------------
> Posted via Jive Forums
> http://forums.openqa.org/thread.jspa?threadID=1013&messageID=2836#2836
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]