Closed
Bug 1128656
Opened 10 years ago
Closed 8 years ago
switch_to_window() should provide an option not to select the underlying tab automatically
Categories
(Remote Protocol :: Marionette, defect)
Remote Protocol
Marionette
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1124604
People
(Reporter: whimboo, Unassigned)
References
Details
(Keywords: pi-marionette-client, pi-marionette-server, Whiteboard: [needs patch on bug 1124604])
As what I have seen today is that when switch_to_window() is called, the target tab is automatically selected. This will make it impossible for us to do checks for background tabs. As Chris mentioned this behavior was added with the patch on one of his bugs.
Here a small code example which demonstrates that in Firefox:
def test_switch_to_window(self):
def selected_index(toolbar):
return int(toolbar.get_attribute('selectedIndex'))
org_handle = self.marionette.current_window_handle
toolbar = self.marionette.find_element('id', 'tabbrowser-tabs')
button = toolbar.find_element('anon attribute', {'anonid': 'tabs-newtab-button'})
button.click()
self.assertEqual(len(self.marionette.window_handles), 2)
self.assertEqual(selected_index(toolbar), 1)
self.marionette.switch_to_window(org_handle)
self.assertEqual(selected_index(toolbar), 1)
Updated•10 years ago
|
Keywords: regression
Comment 1•10 years ago
|
||
I added this with the patch in bug 941749 because it would seem a convenience, but I see how it would be an unacceptable limitation for firefox-ui-tests. It's easy enough to remove, but we might have to add a parameter for this behavior if other users depend on the switching behavior.
Reporter | ||
Comment 2•10 years ago
|
||
So that would be exactly the request I made via bug 1124604, but which has been wontfixed by David. As it looks like it would still be useful here. I think that it is a good reason to reopen bug 1124604, and marking this bug as dependency on it.
Depends on: 1124604
Updated•10 years ago
|
Keywords: ateam-marionette-client,
ateam-marionette-server
Updated•10 years ago
|
Summary: switch_to_window() should not select the underlying tab automatically → switch_to_window() should provide an option not to select the underlying tab automatically
Reporter | ||
Updated•10 years ago
|
Whiteboard: [needs patch on bug 1124604]
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Reporter | ||
Comment 5•9 years ago
|
||
Those two latest comments are not related to this bug which is about window/tab handling in the Marionette framework. Titus, if you have issues with Firefox then please file a bug in the Firefox General component.
Comment 6•9 years ago
|
||
Henrik, Firefox 45 supports Marionette. The gist I linked to clearly has Marionette debug info in it. I believe the issue I'm seeing is related to how tabs are selected. If it is not, I can create a new issue, but it is causing a number of the Ruby Selenium specs to fail.
Reporter | ||
Comment 7•9 years ago
|
||
This bug is specifically to Marionette and switching between tabs and not windows! Please read comment 0. Here in short... switching to a tab should offer a parameter to not automatically focus the target tab.
Reporter | ||
Comment 8•8 years ago
|
||
Looks like a dupe of bug 1124604 now which I just got fixed.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Updated•2 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•