I have posted this in Selenium forum but couldn't get any response there. Another person also expressed a similar concern in a separate post, so I'm assumed this is a bug in the implementation.
Following the steps below Selenium hangs (I'm using Selenium RC 1.0-beta) –
1. From the main page (say Window A), click on a button X that opens a popup window (say, Window B)
2. I could access Window B fine, and click a button on it which opens up a new popup window (say, Window C)
3. Again, I could access Window C fine and perform certain operations. At the end click 'Submit' button which submits the form.
4. Upon successful submission Window C gets closed and the data that is posted is displayed in Window B (as this page refreshes)
After this, no matter what I do I was unable to perform any operations on Window B. I believe reloading the page on Step 4 is causing it. When I try selectWindow() on Window B, selenium hangs. I have searched through this forum and others couldn't find any solutions to this. However, I found very similar scenario described here (4th post in the page): http://clearspace.seleniumhq.org/message/48061
The problem described there is very similar to what I described above:
-------
Clicking on the link From the main window I turn to form opened in a new window. Fill the form fileds and click by submit ( selenium.click("add") ).
After sending data from form (post) form successfully rose. Selenium server return OK. Then test hangs on the next step I irrespective of what action is as follows.
Pressing the sabmit makes the following:
window.close(); - close the form opened in new window
window.opener.parent.location.reload(); - refresh the main window
window.location = ... ; go to the main window.
Implies that the reason of test hangs is window.opener.parent.location.reload();
It seems that selenium lose the current window and now does not know where to send queries.
---------
Please let me know if you need more information.
Please provide a concrete set of files for me to be able to reproduce the issue: