Closed Bug 1373191 Opened 5 years ago Closed 4 years ago
.tab should check that the underlying tab / browser is still present
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.
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.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: marionette-window-tracking
You need to log in before you can comment on or make changes to this bug.