0

I am struck recognizing an popup with a 'OK' button, which is invoked as process of clicking a radio button.

I need to click on 'OK' Button in the popup else the screen is freezes and we can't go any further in the test case.

<HTML CODE>
    <td class="req" align="right"> Exposure: </td>
    <td align="left">
    <input type="radio" value="1" onclick="javascript:onClick_exposure_type(this);" name="exposure_type">
    Open
    <input type="radio" value="2" onclick="javascript:onClick_exposure_type(this);" name="exposure_type">
    Closed
    </td>
    <HTML CODE>

When i record this event in selenium IDE, I get the following

click("xpath=(//input[@name='exposure_type'])[2]")
selectWindow("null")
clickAndWait("name=btnOkay")

I tried doing something like this & didnt help

executeScript("window.confirm = function(msg){return true;};")

Any thoughts would be grateful.

Petr Janeček
  • 37,768
  • 12
  • 121
  • 145
QualityThoughts
  • 79
  • 1
  • 2
  • 9
  • 1
    which language are coding in? – Amey Oct 01 '12 at 20:46
  • just give a try with index based window selection. – Santoshsarma Oct 04 '12 at 19:37
  • What kind of popup? IDE switched to another browser window for a while there. But your solution was targeted for JavaScript's `confirm()`. If the popup is a new browser window, you must [switch to it](http://selenium.googlecode.com/svn/trunk/docs/api/java/com/thoughtworks/selenium/Selenium.html#selectWindow%28java.lang.String%29). – Petr Janeček Feb 10 '13 at 14:14

0 Answers0