Issue Details (XML | Word | Printable)

Key: SRC-574
Type: Bug Bug
Status: Resolved Resolved
Resolution: Cannot Reproduce
Priority: Critical Critical
Assignee: Andras Hatvani
Reporter: SS
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Selenium Remote Control

Unable to select a window under certain conditions

Created: 05/Dec/08 11:37 AM   Updated: 11/Jun/10 04:15 PM   Resolved: 09/Apr/09 11:45 AM
Return to search
Component/s: None
Affects Version/s: 1.0 beta 1
Fix Version/s: None


 Description  « Hide

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.



Andras Hatvani made changes - 15/Feb/09 08:35 AM
Field Original Value New Value
Assignee Andras Hatvani [ andras.hatvani ]
Andras Hatvani added a comment - 15/Feb/09 08:40 AM

Please provide a concrete set of files for me to be able to reproduce the issue:

  • simple static HTML files implementing the described behavior and dependency
  • test case implementing the desired flow.

Andras Hatvani added a comment - 09/Apr/09 11:45 AM

Incomplete report; please provide a concrete and reproducible test case if the issue still causes headache.


Andras Hatvani made changes - 09/Apr/09 11:45 AM
Resolution Cannot Reproduce [ 5 ]
Status Open [ 1 ] Resolved [ 5 ]
James added a comment - 11/Jun/10 04:15 PM

I too am seeing a similar hang. My application requires login/logout. Upon logout, the page is refreshed. About 90% of the time, I am seeing the test hang immediately after the logout. We use the following block of code to perform the logout:

$j.ajax({
url: "../Logout.html",
cache: false,
success: function(html){ location.reload(true); },
failure: function() { location.reload(true); }
});

Seems that when the reload happens, Selenium loses connection with the browser. The issue does not seem to be as prevalent when running locally, but when running on our remote Grid, we are seeing 90% failure rates.