Closed tod222 closed 3 years ago
Probably because there is no way, and has never been a way to page between tabs via either the JSONWire or WC3 selenium spec.
Open new tabs all you like, so long as you want to be unable to interact with them.
Does whacking them from webdriver_prefs.json fix it nonetheless? AFAIK this is the default behavior on newer driver binaries and the seleniumhq jar, so it's probably not needed to freeze this any longer; if users wanna footgun I probably shouldn't prevent them from doing so.
Interesting. Nobody told us it was impossible so we've been doing it for ~2 years. Pretty sure we started back before needing to patch Selenium/Firefox/webdriver_prefs.json. open_window_in_new_tab_and_switch_to_it
So, you are just using switch_to_window, and the browser vendors have made that actually switch tab instead of exploding like it used to for years.
I'm curious, what does new tabs get you over and above a new window? If you interact with it the same way you do a new window, I don't see any real benefit.
Nevertheless, if the browser vendors have started supporting this, I have no objection to removing this, I just don't see that it's hurting anything (but would love to hear a reason).
A tab comes up in the main window at the same size as the previous tab. In our experience a new separate window comes up with an arbitrary size, usually smaller than the main window. With small windows elements are more likely to be offscreen and thus generate errors when clicked due to all the inconvenient sanity checking that came with Quantum.
It's not only inconvenient, but even does it's check incorrectly when negative margins are involved. I resorted in my own code to only doing click() with javascript because of such nonsense.
Anyways, I generally have avoided this by wrapping all window handling code to paranoidly maximize everything. (the reason I maximize is also because the dimension setting methods appear to work randomly if at all. Really is an amazing framework this selenium).
That said, timtowtdi, so I'll make a patch to waste the frozen prefs. It doesn't look like it's really needed anymore.
Specifically:
We need to change newwindow to 3 to always open in a new tab, but these frozen capabilities prevent that.