Can't open new windows with Javascript

RESOLVED INVALID

Status

Testing
Marionette
RESOLVED INVALID
a year ago
2 months ago

People

(Reporter: dylan, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36

Steps to reproduce:

1.Start a Selenium-Server 2.53.1 with Marionette tagged at v0.9.0.
2. Executed the Selenium script here (https://gist.github.com/DylanLacey/094532b6a4a2bc37c87645277c0c7565) include a command to open a new window with Javascript
3. Checked the number of returned window handles.
4. Repeated the above but with Marionette disabled.


Actual results:

Only one window handle was returned, only one window appeared to open.


Expected results:

Two browser windows should be open and two window handles returned.
This appears to have been fixed at some point. 

>>> from selenium import webdriver
>>> f=webdriver.Firefox()
>>> f.get("https://www.mozilla.com")
>>> f.window_handles
[u'2147483649']
>>> f.execute_script("window.open()")
>>> f.window_handles
[u'2147483649', u'2147483653']
Status: UNCONFIRMED → RESOLVED
Last Resolved: 2 months ago
Resolution: --- → WORKSFORME
The script is not waiting for the second window to be open, but assumes it appears immediately. A Wait().until() would be necessary instead.
Resolution: WORKSFORME → INVALID
You need to log in before you can comment on or make changes to this bug.