History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SRC-331
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Dan Fabulich
Reporter: Dan Fabulich
Votes: 0
Watchers: 0
Operations

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

PI: In multi-domain pages, when a subframe changes the location of the top frame, the test can hang

Created: 24/Aug/07 03:48 AM   Updated: 12/Aug/08 05:37 PM
Component/s: Proxy Injection
Affects Version/s: None
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 Description  « Hide
When a subframe in domain A changes the location of the top frame in domain B, it immediately halts the execution of the currently running subframe's JavaScript, so the subframe never gets to reply "OK" to the server; it doesn't even fire his "onunload" event, which would have at least gotten word back to the server that the subframe had died.

I managed to reproduce this by modifying NestedFrames.html to use a synonym for localhost when loading NestedFrames2.html. As far as I can tell, this only happens in multi-domain pages in PI mode.

I can sort-of get past it by calling selenium.doClick in a setTimeout, to guarantee that I at least get an "OK" back from the subframe, but when the top window's location finally changes, the only frame who gets a chance to fire his "onunload" event is the top frame, so Selenium continues to try to "getWhetherThisFrameMatchFrameExpression" commands to the dead subframes of the previous page... you get the same "stalling" effect as before.

I'm going to have to how to think about this one in PI mode. I think the ultimate fix is going to involve assuming that if a frame has closed, all of its children have also closed. (That, in turn, requires me to assume that I understand, on the server side, which frames are children of which, something I've been loathe to assume thus far.) Alternately, I may want to try to create a new command that sends some sort of hint to the server that it should assume that all subframes are dead and that it should only try to talk to "top" frames.

 All   Comments   Work Log   Change History      Sort Order:
Dan Fabulich - 24/Aug/07 12:51 PM
Uh, apparently this happens in IE as well. The catch here is that selectFrame works by contacting each frame and calling getWhetherFrameMatchFrameExpression; if the frame turns out to be correct, we use it, so the test doesn't hang in that case. (Not sure, but I think the dead frames could still cause a problem in future calls to selectFrame.)