0

My website is opening in a pop up, so all my website functionality is on the same window. But I am unable to record the Selenium RC scripts, because it doesn't not the pop up window. Please help me, how do I record them?

Petr Janeček
  • 37,768
  • 12
  • 121
  • 145

1 Answers1

0

Selenium IDE doesn't handle those automatically, you have to insert the command manually.

See this page for details. Or this question: How to record popup windows with selenium IDE?


EDIT - Sorry, I misinterpreted your word "record".

Use selenium.selectPopUp() or a stronger version of the same: selenium.selectWindow().

Both possibly in addition to selenium.waitForPopUp()

Community
  • 1
  • 1
Petr Janeček
  • 37,768
  • 12
  • 121
  • 145
  • NO, I am writing selenium RC code for this, not selenium IDE. – user138201 May 10 '12 at 12:46
  • Thanx buddy for your fast reply, But I am using the same ,but still control is not going on the specific pop up. – user138201 May 10 '12 at 12:56
  • Oh, you could have said that and save us both some time :). Please, post your code + information about what _exactly_ is failing with what message. – Petr Janeček May 10 '12 at 12:58
  • selenium.waitForPopUp("ABC", "30000"); Thread.sleep(2000L); selenium.selectPopUp(""); selenium.selectWindow(""); Thread.sleep(2000L); //selenium.getText(locator) selenium.select("region", "CS"); – user138201 May 10 '12 at 13:08
  • ERROR IS :com.thoughtworks.selenium.SeleniumException: ERROR: Element region not found at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:100) at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:94) at com.thoughtworks.selenium.DefaultSelenium.select(DefaultSelenium.java:319) at dd_tests.P_Report.testReport(P_Report.java:94) – user138201 May 10 '12 at 13:10
  • Here region is nothing but xpath of one dropdown on the target pop up which is put in configured file. – user138201 May 10 '12 at 13:12