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.

asked Jul 10, 2014 at 13:54

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.

demouser123
3,5325 gold badges30 silver badges41 bronze badges
answered Jul 10, 2014 at 16:28
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
answered Jul 6, 2015 at 16:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.