3

While recording through Selenium IDE, When a pop up window opens it is not getting recorded. "At the time of executing an error message is displayed.Please help me out.

Emmanuel Angelo.R
  • 1,545
  • 2
  • 16
  • 24
Raghu
  • 31
  • 1
  • 1
  • 2

5 Answers5

3

If that pop up window has name, like opening from javascript window.open(URL, name). Then it is possible to add the command to check the content of the popup. Like following command: waitForPopUp | winId | 30000 selectWindow | winId ... close

However, if the window has no name, like opened from <a target="_blank"> then you are out of luck.

Go to http://wiki.openqa.org/display/SEL/Selenium+Core+FAQ#SeleniumCoreFAQ-HowdoIworkwithapopupwindow%3F for further details.

Ding-Yi Chen
  • 2,830
  • 33
  • 27
1

You must use the command WaitForPopUp and value 30000

Try this and record properly.

Aaron Blenkush
  • 3,034
  • 2
  • 28
  • 54
Mahesh
  • 11
  • 1
  • Welcome to Stack Overflow! Consider adding a bit more explanation to your answer by hitting [`Edit`](http://stackoverflow.com/posts/15446210/edit). See the About page (http://stackoverflow.com/about). Happy coding! – Aaron Blenkush Mar 16 '13 at 06:35
1

Selenium IDE does not recognize any kind of popup, either you have to add it manually or Use Selenium RC, pop are handled there.

Ranjini
  • 11
  • 1
  • 3
0

Selenium IDE can record popup, below is my code I record Popup through selenium, check and let me know

 <tr>
<td>click</td>
<td>id=edit-legal-accept</td> // click on this then pop up is open
<td></td>
</tr>
<tr>
<td>waitForPopUp</td>
<td>CtrlWindow</td>
<td>30000</td>
</tr>
<tr>
<td>selectWindow</td> 
<td>name=CtrlWindow</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Terms And Conditions</td>
<td></td>
</tr>
<tr>
<td>verifyTextPresent</td>
<td>Terms &amp; Conditions of Use</td>
<td></td>
</tr>
<tr>
<td>close</td>
<td></td>
<td></td>
</tr>
<tr>
<td>selectWindow</td>  // This command used to select our main windows
<td>null</td>  
<td></td>
</tr>
Ankit jain
  • 4,198
  • 4
  • 19
  • 24
0

Unfortunately Selenium IDE record/replay doesn't always record everything. It tries it best to do that but if there is an AJAX call it may not record this.

Best practise is to use the record to get a the main body of the test and then adapt it to handle the parts that it missed

I suggest manually adding those extra lines to your tests.

AutomatedTester
  • 22,188
  • 7
  • 49
  • 62