Closed Bug 1373191 Opened 7 years ago Closed 7 years ago

Context.tab should check that the underlying tab / browser is still present

Categories

(Remote Protocol :: Marionette, enhancement, P3)

55 Branch
enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1311041

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

Caching the tab is bad and will result in failures accessing it when an action outside of Marionette closes or replaces it. We have recently seen this with bug 1351940, and which blocks to land a Photon feature on bug 1219725. Changing this shouldn't be too hard. So I will take care of this today.
Hm, thinking more about it we should not just switch to another tab when the one currently selected does not exist anymore. I think in such a case we should raise a NoSuchWindow error, so the test knows that the current tab is no more. Another call to `switch_to_window` will make sure that a workable tab is present again.
Summary: Context.tab shouldn't use a cached version of the tab but return the currently selected one → Context.tab should check that the underlying tab / browser is still present
Also to note here is that in case of sessionrestore enabled and a restart of Firefox, we do not get the window handles for those tabs which haven't been restored yet. It means if the second tab of a window is focused, the first one is not getting reported because it doesn't contain a valid content browser. See bug 1291844 for details.
Blocks: 1291844
I wonder how we could handle those tabs. What I don't want is that we set 'browser.sessionstore.restore_on_demand' to False, because this will affect startup time negatively for each restart.
We might want to wait for bug 1311041.
Priority: -- → P3
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.