1

How to create Selenium IDE script when passing value [Using hyperlink] from one HTML page to other.

In my case the page was automatically closed After passing the value. When i am trying to run the test using Selenium IDE showing error like "[error] modifyWindow: Window was closed!"

The sample of the web page is like this

enter image description here

When i click on 'Search Customer ID' button of the first form, it will show a pop up window [like HTML Page 2]. After searching customer name, a list of details will shows in the pop up window. Select one of the customer by click on 'Select'[hyperlink] and the customer ID details are automatically loading to the first page [In the Customer ID field of HTML page 1]. At this time the second window will closed.

2 Answers 2

1

If I understood correctly, it sounds like you have a test that clicks on a hyperlink, that will then close the current window and open a new one? If that is not correct, please add more details.

In order to instruct Selenium to use the new window, you need to use:

selectWindow(windowID)

The windowID would be the title of the window.

0

You can use the selectWindow command to set the focus on a different window, for example:

Command         Target               Value
------------------------------------------
waitForPopUp                         15000
selectWindow   title=Hello World

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.