Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONTROL Key Chords Not Working to open new tabs and windows #786

Closed
2 tasks done
BrandonDudek opened this issue Jun 15, 2017 · 40 comments
Closed
2 tasks done

CONTROL Key Chords Not Working to open new tabs and windows #786

BrandonDudek opened this issue Jun 15, 2017 · 40 comments

Comments

@BrandonDudek
Copy link

BrandonDudek commented Jun 15, 2017

In order to help us efficiently investigate your issue, please provide the following information:

Platform and application details

  • Platform: Windows 7
  • Firefox: 54.0 (32 & 64 bit)
  • Selenium: 3.4
  • Java: 1.8
  • geckodriver: 0.17.0

Steps to reproduce

  • Reproducable testcase:
    WebDriver.get( "https://www.google.com" );
    WebDriver.findElement( By.xpath( "/html/body" ) ).sendKeys( Keys.chord( Keys.CONTROL, "n" ) );

  • A trace level log:

1497556507297	geckodriver	INFO	Listening on 127.0.0.1:18880
1497556537082	addons.manager	DEBUG	Application has been upgraded
1497556537820	addons.manager	DEBUG	Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"]
1497556537822	addons.manager	DEBUG	Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"]
1497556537826	addons.manager	DEBUG	Loaded provider scope for resource://gre/modules/addons/GMPProvider.jsm
1497556537828	addons.manager	DEBUG	Loaded provider scope for resource://gre/modules/addons/PluginProvider.jsm
1497556537829	addons.manager	DEBUG	Starting provider: XPIProvider
1497556537829	addons.xpi	DEBUG	startup
1497556537830	addons.xpi	INFO	Mapping firebug@software.joehewitt.com to C:\Users\U6026612\AppData\Local\Temp\rust_mozprofile.J7Qpo9CrODj0\extensions\firebug@software.joehewitt.com
1497556537831	addons.xpi	INFO	Mapping FireXPath@pierre.tholence.com to C:\Users\U6026612\AppData\Local\Temp\rust_mozprofile.J7Qpo9CrODj0\extensions\FireXPath@pierre.tholence.com
1497556537831	addons.xpi	INFO	Removing all system add-on upgrades.
1497556537832	addons.xpi	INFO	SystemAddonInstallLocation directory is missing
1497556537833	addons.xpi	INFO	Mapping aushelper@mozilla.org to C:\Program Files\Mozilla Firefox\browser\features\aushelper@mozilla.org.xpi
1497556537833	addons.xpi	INFO	Mapping e10srollout@mozilla.org to C:\Program Files\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1497556537833	addons.xpi	INFO	Mapping firefox@getpocket.com to C:\Program Files\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1497556537833	addons.xpi	INFO	Mapping screenshots@mozilla.org to C:\Program Files\Mozilla Firefox\browser\features\screenshots@mozilla.org.xpi
1497556537834	addons.xpi	INFO	Mapping webcompat@mozilla.org to C:\Program Files\Mozilla Firefox\browser\features\webcompat@mozilla.org.xpi
1497556537834	addons.xpi	INFO	Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to C:\Program Files\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi
1497556537835	addons.xpi	DEBUG	checkForChanges
1497556537835	addons.xpi	INFO	SystemAddonInstallLocation directory is missing
1497556537836	addons.xpi	DEBUG	Loaded add-on state from prefs: {}
1497556537836	addons.xpi	DEBUG	New add-on firebug@software.joehewitt.com in app-profile
1497556537837	addons.xpi	DEBUG	getModTime: Recursive scan of firebug@software.joehewitt.com
1497556538197	addons.xpi	DEBUG	New add-on FireXPath@pierre.tholence.com in app-profile
1497556538197	addons.xpi	DEBUG	getModTime: Recursive scan of FireXPath@pierre.tholence.com
1497556538265	addons.xpi	DEBUG	New add-on aushelper@mozilla.org in app-system-defaults
1497556538266	addons.xpi	DEBUG	getModTime: Recursive scan of aushelper@mozilla.org
1497556538266	addons.xpi	DEBUG	New add-on e10srollout@mozilla.org in app-system-defaults
1497556538266	addons.xpi	DEBUG	getModTime: Recursive scan of e10srollout@mozilla.org
1497556538267	addons.xpi	DEBUG	New add-on firefox@getpocket.com in app-system-defaults
1497556538267	addons.xpi	DEBUG	getModTime: Recursive scan of firefox@getpocket.com
1497556538267	addons.xpi	DEBUG	New add-on screenshots@mozilla.org in app-system-defaults
1497556538267	addons.xpi	DEBUG	getModTime: Recursive scan of screenshots@mozilla.org
1497556538268	addons.xpi	DEBUG	New add-on webcompat@mozilla.org in app-system-defaults
1497556538268	addons.xpi	DEBUG	getModTime: Recursive scan of webcompat@mozilla.org
1497556538268	addons.xpi	DEBUG	New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} in app-global
1497556538268	addons.xpi	DEBUG	getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1497556538269	addons.xpi	DEBUG	getInstallState changed: true, state: {"app-profile":{"firebug@software.joehewitt.com":{"d":"C:\\Users\\U6026612\\AppData\\Local\\Temp\\rust_mozprofile.J7Qpo9CrODj0\\extensions\\firebug@software.joehewitt.com","st":1497556536555,"mt":1497556534407},"FireXPath@pierre.tholence.com":{"d":"C:\\Users\\U6026612\\AppData\\Local\\Temp\\rust_mozprofile.J7Qpo9CrODj0\\extensions\\FireXPath@pierre.tholence.com","st":1497556536637,"mt":1497556536611}},"app-system-defaults":{"aushelper@mozilla.org":{"d":"C:\\Program Files\\Mozilla Firefox\\browser\\features\\aushelper@mozilla.org.xpi","st":1496950078000},"e10srollout@mozilla.org":{"d":"C:\\Program Files\\Mozilla Firefox\\browser\\features\\e10srollout@mozilla.org.xpi","st":1496950078000},"firefox@getpocket.com":{"d":"C:\\Program Files\\Mozilla Firefox\\browser\\features\\firefox@getpocket.com.xpi","st":1496950079000},"screenshots@mozilla.org":{"d":"C:\\Program Files\\Mozilla Firefox\\browser\\features\\screenshots@mozilla.org.xpi","st":1496950079000},"webcompat@mozilla.org":{"d":"C:\\Program Files\\Mozilla Firefox\\browser\\features\\webcompat@mozilla.org.xpi","st":1496950078000}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\\Program Files\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","st":1496950078000}}}
1497556538278	addons.xpi-utils	DEBUG	Opening XPI database C:\Users\U6026612\AppData\Local\Temp\rust_mozprofile.J7Qpo9CrODj0\extensions.json
1497556538280	addons.xpi-utils	DEBUG	New add-on firebug@software.joehewitt.com installed in app-profile
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1497556538505	DeferredSave.extensions.json	DEBUG	Save changes
1497556538505	addons.xpi-utils	DEBUG	New add-on FireXPath@pierre.tholence.com installed in app-profile
1497556538510	DeferredSave.extensions.json	DEBUG	Starting timer
1497556538526	DeferredSave.extensions.json	DEBUG	Save changes
1497556538526	addons.xpi-utils	DEBUG	New add-on aushelper@mozilla.org installed in app-system-defaults
1497556538532	DeferredSave.extensions.json	DEBUG	Save changes
1497556538533	addons.xpi-utils	DEBUG	New add-on e10srollout@mozilla.org installed in app-system-defaults
1497556538538	DeferredSave.extensions.json	DEBUG	Save changes
1497556538538	addons.xpi-utils	DEBUG	New add-on firefox@getpocket.com installed in app-system-defaults
1497556538544	DeferredSave.extensions.json	DEBUG	Starting write
1497556538551	DeferredSave.extensions.json	DEBUG	Save changes
1497556538552	DeferredSave.extensions.json	DEBUG	Data changed while write in progress
1497556538552	addons.xpi-utils	DEBUG	New add-on screenshots@mozilla.org installed in app-system-defaults
1497556538559	DeferredSave.extensions.json	DEBUG	Save changes
1497556538560	addons.xpi-utils	DEBUG	New add-on webcompat@mozilla.org installed in app-system-defaults
1497556538564	DeferredSave.extensions.json	DEBUG	Save changes
1497556538564	addons.xpi-utils	DEBUG	New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global
1497556538567	DeferredSave.extensions.json	DEBUG	Save changes
1497556538568	addons.manager	DEBUG	Registering startup change 'installed' for firebug@software.joehewitt.com
1497556538568	addons.manager	DEBUG	Registering startup change 'installed' for firebug@software.joehewitt.com
1497556538579	addons.xpi	DEBUG	Loading bootstrap scope from C:\Users\U6026612\AppData\Local\Temp\rust_mozprofile.J7Qpo9CrODj0\extensions\firebug@software.joehewitt.com
1497556538584	addons.xpi	DEBUG	Calling bootstrap method install on firebug@software.joehewitt.com version 2.0.19
1497556538584	addons.xpi-utils	DEBUG	Make addon app-profile:firebug@software.joehewitt.com visible
1497556538587	addons.xpi	DEBUG	Add-on firebug@software.joehewitt.com blocks e10s rollout.
1497556538588	DeferredSave.extensions.json	DEBUG	Save changes
1497556538588	addons.manager	DEBUG	Registering startup change 'installed' for FireXPath@pierre.tholence.com
1497556538588	addons.xpi-utils	DEBUG	Make addon app-profile:FireXPath@pierre.tholence.com visible
1497556538589	addons.xpi	DEBUG	Add-on firebug@software.joehewitt.com blocks e10s rollout.
1497556538589	DeferredSave.extensions.json	DEBUG	Save changes
1497556538589	addons.manager	DEBUG	Registering startup change 'installed' for aushelper@mozilla.org
1497556538589	addons.xpi	DEBUG	Loading bootstrap scope from C:\Program Files\Mozilla Firefox\browser\features\aushelper@mozilla.org.xpi
1497556538592	addons.xpi	DEBUG	Calling bootstrap method install on aushelper@mozilla.org version 2.0
1497556538592	addons.xpi-utils	DEBUG	Make addon app-system-defaults:aushelper@mozilla.org visible
1497556538592	addons.xpi	DEBUG	Add-on firebug@software.joehewitt.com blocks e10s rollout.
1497556538593	DeferredSave.extensions.json	DEBUG	Save changes
1497556538593	addons.manager	DEBUG	Registering startup change 'installed' for e10srollout@mozilla.org
1497556538594	addons.xpi	DEBUG	Loading bootstrap scope from C:\Program Files\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1497556538597	addons.xpi	DEBUG	Calling bootstrap method install on e10srollout@mozilla.org version 1.50
1497556538597	addons.xpi	DEBUG	Add-on FireXPath@pierre.tholence.com blocks e10s rollout.
1497556538597	addons.xpi	DEBUG	Add-on FireXPath@pierre.tholence.com blocks e10s rollout.
1497556538598	addons.xpi-utils	DEBUG	Make addon app-system-defaults:e10srollout@mozilla.org visible
1497556538599	addons.xpi	DEBUG	Add-on FireXPath@pierre.tholence.com blocks e10s rollout.
1497556538599	DeferredSave.extensions.json	DEBUG	Save changes
1497556538599	addons.manager	DEBUG	Registering startup change 'installed' for firefox@getpocket.com
1497556538599	addons.xpi	DEBUG	Loading bootstrap scope from C:\Program Files\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1497556538603	addons.xpi	DEBUG	Calling bootstrap method install on firefox@getpocket.com version 1.0.5
1497556538603	addons.xpi-utils	DEBUG	Make addon app-system-defaults:firefox@getpocket.com visible
1497556538603	addons.xpi	DEBUG	Add-on FireXPath@pierre.tholence.com blocks e10s rollout.
1497556538603	DeferredSave.extensions.json	DEBUG	Save changes
1497556538604	addons.manager	DEBUG	Registering startup change 'installed' for screenshots@mozilla.org
1497556538604	addons.xpi	DEBUG	Loading bootstrap scope from C:\Program Files\Mozilla Firefox\browser\features\screenshots@mozilla.org.xpi
1497556538607	addons.xpi	DEBUG	Calling bootstrap method install on screenshots@mozilla.org version 6.6.0
1497556538607	addons.xpi-utils	DEBUG	Make addon app-system-defaults:screenshots@mozilla.org visible
1497556538607	addons.xpi	DEBUG	Add-on FireXPath@pierre.tholence.com blocks e10s rollout.
1497556538607	DeferredSave.extensions.json	DEBUG	Save changes
1497556538608	addons.manager	DEBUG	Registering startup change 'installed' for webcompat@mozilla.org
1497556538608	addons.xpi	DEBUG	Loading bootstrap scope from C:\Program Files\Mozilla Firefox\browser\features\webcompat@mozilla.org.xpi
1497556538610	addons.xpi	DEBUG	Calling bootstrap method install on webcompat@mozilla.org version 1.1
1497556538610	addons.xpi-utils	DEBUG	Make addon app-system-defaults:webcompat@mozilla.org visible
1497556538610	addons.xpi	DEBUG	Add-on FireXPath@pierre.tholence.com blocks e10s rollout.
1497556538611	DeferredSave.extensions.json	DEBUG	Save changes
1497556538612	addons.xpi-utils	DEBUG	Make addon app-global:{972ce4c6-7e08-4474-a285-3208198ce6fd} visible
1497556538613	addons.xpi	DEBUG	Add-on FireXPath@pierre.tholence.com blocks e10s rollout.
1497556538613	DeferredSave.extensions.json	DEBUG	Save changes
1497556538614	addons.xpi	DEBUG	Updating XPIState for {"id":"firebug@software.joehewitt.com","syncGUID":"{32d5aeee-77df-4422-ba04-87451f65cfd8}","location":"app-profile","version":"2.0.19","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":"chrome://firebug/skin/firebugBig.png","icon64URL":null,"defaultLocale":{"name":"Firebug","description":"Web Development Evolved. Firebug is free and open source software distributed under the BSD License.","creator":"Joe Hewitt","homepageURL":"http://www.getfirebug.com/","translators":["Leszek(teo)Zyczkowski (pl-PL)","markh (nl)","peter3 (sv-SE)","AlleyKat (da-DK)","Hector Zhao, lovelywcm (zh-CN)","Lukas Kucharczyk, Michal Kec (cs-CZ)","Team erweiterungen.de, ReinekeFux, Benedikt Langens, Sebastian Zartner (de-DE)","l0stintranslation, gonzalopirobutirro, Luigi Grilli (it-IT)","alexxed (ro-RO)","Nicolas Martin, Franck Marcia (fr-FR)","gLes (hu-HU)","Xavi Ivars - Softcatala (ca)","gezmen (tr-TR)","eternoendless (es-AR)","Dark Preacher (ru)","Tiago Oliveira, Diego de Carvalho Zimmermann, Alexandre Rapaki (pt-BR)","Juan Botias, Alvaro G. Vicario (es-ES)","Andriy Zhouck (uk-UA)","Hisateru Tanaka, k2jp (ja-JP)","Mohsen Shadroo (fa-IR)","Eduard Babayan (hy-AM)","Helder Magalhaes (pt-PT)","Tomaz Macus (sl-SI)","Stoyan Stefanov, Alexander Shopov (bg)","Kristjan Bjarni Guomundsson (is-IS)","NGUYEN Manh Hung (vi-VN)","Bwah (hr-HR)","Sonickydon (el)","David Gonzales (es)","DakSrbija (sr)","bootleq (zh-TW)","Asier Iturralde Sarasola, Julen Irazoki Oteiza (eu)"],"contributors":["John J. Barton (IBM Almaden)","Jan Odvarko (Mozilla Corp.)","Max Stepanov (Aptana Inc.)","Rob Campbell (Mozilla Corp.)","Hans Hillen (Paciello Group, Mozilla)","Curtis Bartley (Mozilla Corp.)","Mike Collins (IBM Almaden)","Kevin Decker","Mike Ratcliffe (Mozilla Corp.)","Hernan Rodriguez Colmeiro","Austin Andrews","Christoph Dorn","Steven Roussey (Illuminations for Developers)","Sebastian Zartner","Harutyun Amirjanyan","Simon Lindholm","Stampolidis Anastasios","Joe Walker (Mozilla Corp.)","Vladimir Zhuravlev","Farshid Beheshti","Leon Sorokin","Florent Fayolle","Hector Zhao","Bharath Thiruveedula","Nathan Mische","Belakhdar Abdeldjalil","Jakob Kaltenbrunner"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Users\\U6026612\\AppData\\Local\\Temp\\rust_mozprofile.J7Qpo9CrODj0\\extensions\\firebug@software.joehewitt.com","installDate":1497556536555,"updateDate":1497556536555,"applyBackgroundUpdates":1,"bootstrap":true,"skinnable":false,"size":9681994,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":true,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"toolkit@mozilla.org","minVersion":"30.0a1","maxVersion":"54.0"},{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"30.0a1","maxVersion":"54.0"}],"targetPlatforms":[],"multiprocessCompatible":true,"signedState":2,"seen":true,"dependencies":[],"hasEmbeddedWebExtension":false,"mpcOptedOut":false,"userPermissions":null}
1497556538614	addons.xpi	DEBUG	getModTime: Recursive scan of firebug@software.joehewitt.com
1497556538693	addons.xpi	DEBUG	Updating XPIState for {"id":"FireXPath@pierre.tholence.com","syncGUID":"{76aa0abc-d7f4-426c-a675-8d348a41a656}","location":"app-profile","version":"0.9.7.1.1-signed.1-signed","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":"chrome://firepath/content/FirePath.png","icon64URL":null,"defaultLocale":{"name":"FirePath","description":"FirePath is a Firebug extension that adds a development tool to edit, inspect and generate XPath 1.0 expressions, CSS 3 selectors and JQuery selectors.","creator":"Pierre Tholence","homepageURL":null,"contributors":["David Rees"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Users\\U6026612\\AppData\\Local\\Temp\\rust_mozprofile.J7Qpo9CrODj0\\extensions\\FireXPath@pierre.tholence.com","installDate":1497556536637,"updateDate":1497556536637,"applyBackgroundUpdates":1,"bootstrap":false,"skinnable":false,"size":168435,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":true,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"4.0","maxVersion":"34.*"}],"targetPlatforms":[],"multiprocessCompatible":false,"signedState":2,"seen":true,"dependencies":[],"hasEmbeddedWebExtension":false,"mpcOptedOut":false,"userPermissions":null}
1497556538693	addons.xpi	DEBUG	getModTime: Recursive scan of FireXPath@pierre.tholence.com
1497556538697	addons.xpi	DEBUG	Updating XPIState for {"id":"aushelper@mozilla.org","syncGUID":"{33942af1-6b48-43bc-863b-1db19e9690d4}","location":"app-system-defaults","version":"2.0","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Application Update Service Helper","description":"Sets value(s) in the update url based on custom checks.","creator":null,"homepageURL":null},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Program Files\\Mozilla Firefox\\browser\\features\\aushelper@mozilla.org.xpi","installDate":1496950078000,"updateDate":1496950078000,"applyBackgroundUpdates":1,"bootstrap":true,"skinnable":false,"size":8486,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"54.0","maxVersion":"54.*"}],"targetPlatforms":[],"multiprocessCompatible":true,"seen":true,"dependencies":[],"hasEmbeddedWebExtension":false,"mpcOptedOut":false,"userPermissions":null}
1497556538698	addons.xpi	DEBUG	getModTime: Recursive scan of aushelper@mozilla.org
1497556538698	addons.xpi	DEBUG	Updating XPIState for {"id":"e10srollout@mozilla.org","syncGUID":"{cd9e2cde-8dd3-48c3-b8a6-9b69a70c384e}","location":"app-system-defaults","version":"1.50","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Multi-process staged rollout","description":"Staged rollout of Firefox multi-process feature.","creator":null,"homepageURL":null},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Program Files\\Mozilla Firefox\\browser\\features\\e10srollout@mozilla.org.xpi","installDate":1496950078000,"updateDate":1496950078000,"applyBackgroundUpdates":1,"bootstrap":true,"skinnable":false,"size":12517,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"54.0","maxVersion":"54.*"}],"targetPlatforms":[],"multiprocessCompatible":true,"seen":true,"dependencies":[],"hasEmbeddedWebExtension":false,"mpcOptedOut":false,"userPermissions":null}
1497556538698	addons.xpi	DEBUG	getModTime: Recursive scan of e10srollout@mozilla.org
1497556538699	addons.xpi	DEBUG	Updating XPIState for {"id":"firefox@getpocket.com","syncGUID":"{b4d40693-17c6-4ff6-9f5d-0aba93afedfd}","location":"app-system-defaults","version":"1.0.5","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Pocket","description":"When you find something you want to view later, put it in Pocket.","creator":null,"homepageURL":null},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Program Files\\Mozilla Firefox\\browser\\features\\firefox@getpocket.com.xpi","installDate":1496950079000,"updateDate":1496950079000,"applyBackgroundUpdates":1,"bootstrap":true,"skinnable":false,"size":913904,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"54.0","maxVersion":"54.*"}],"targetPlatforms":[],"multiprocessCompatible":true,"seen":true,"dependencies":[],"hasEmbeddedWebExtension":false,"mpcOptedOut":false,"userPermissions":null}
1497556538699	addons.xpi	DEBUG	getModTime: Recursive scan of firefox@getpocket.com
1497556538700	addons.xpi	DEBUG	Updating XPIState for {"id":"screenshots@mozilla.org","syncGUID":"{348a7edb-e101-4232-ab75-6b4ffcc6a4a4}","location":"app-system-defaults","version":"6.6.0","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Firefox Screenshots","description":null,"creator":null,"homepageURL":"https://pageshot.net/"},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Program Files\\Mozilla Firefox\\browser\\features\\screenshots@mozilla.org.xpi","installDate":1496950079000,"updateDate":1496950079000,"applyBackgroundUpdates":1,"bootstrap":true,"skinnable":false,"size":716271,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"51.0a1","maxVersion":"*"}],"targetPlatforms":[],"multiprocessCompatible":true,"seen":true,"dependencies":[],"hasEmbeddedWebExtension":false,"mpcOptedOut":false,"userPermissions":null}
1497556538700	addons.xpi	DEBUG	getModTime: Recursive scan of screenshots@mozilla.org
1497556538700	addons.xpi	DEBUG	Updating XPIState for {"id":"webcompat@mozilla.org","syncGUID":"{c756adc1-e810-4030-bd72-9e71eef6bd4d}","location":"app-system-defaults","version":"1.1","type":"extension","internalName":null,"updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":null,"icon64URL":null,"defaultLocale":{"name":"Web Compat","description":"Urgent post-release fixes for web compatibility.","creator":null,"homepageURL":null},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Program Files\\Mozilla Firefox\\browser\\features\\webcompat@mozilla.org.xpi","installDate":1496950078000,"updateDate":1496950078000,"applyBackgroundUpdates":1,"bootstrap":true,"skinnable":false,"size":9004,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":false,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"54.0","maxVersion":"54.*"}],"targetPlatforms":[],"multiprocessCompatible":true,"seen":true,"dependencies":[],"hasEmbeddedWebExtension":false,"mpcOptedOut":false,"userPermissions":null}
1497556538700	addons.xpi	DEBUG	getModTime: Recursive scan of webcompat@mozilla.org
1497556538700	addons.xpi	DEBUG	Updating XPIState for {"id":"{972ce4c6-7e08-4474-a285-3208198ce6fd}","syncGUID":"{69e49cd1-a77e-4c64-b4f1-87e434e0e03c}","location":"app-global","version":"54.0","type":"theme","internalName":"classic/1.0","updateURL":null,"updateKey":null,"optionsURL":null,"optionsType":null,"aboutURL":null,"icons":{},"iconURL":"chrome://browser/content/default-theme-icon.svg","icon64URL":null,"defaultLocale":{"name":"Default","description":"The default theme.","creator":"Mozilla","homepageURL":null,"contributors":["Mozilla Contributors"]},"visible":true,"active":true,"userDisabled":false,"appDisabled":false,"descriptor":"C:\\Program Files\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}.xpi","installDate":1496950078000,"updateDate":1496950078000,"applyBackgroundUpdates":1,"skinnable":true,"size":8201,"sourceURI":null,"releaseNotesURI":null,"softDisabled":false,"foreignInstall":false,"hasBinaryComponents":false,"strictCompatibility":true,"locales":[],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"54.0","maxVersion":"54.0"}],"targetPlatforms":[],"seen":true,"dependencies":[],"hasEmbeddedWebExtension":false,"userPermissions":null}
1497556538701	addons.xpi	DEBUG	getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
1497556538701	addons.xpi	DEBUG	Add-on FireXPath@pierre.tholence.com blocks e10s rollout.
1497556538701	DeferredSave.extensions.json	DEBUG	Save changes
1497556538701	addons.xpi	DEBUG	Updating database with changes to installed add-ons
1497556538701	addons.xpi-utils	DEBUG	Updating add-on states
1497556538703	addons.xpi-utils	DEBUG	Writing add-ons list
1497556538707	addons.xpi	DEBUG	Registering manifest for C:\Program Files\Mozilla Firefox\browser\features\aushelper@mozilla.org.xpi
1497556538708	addons.xpi	DEBUG	Calling bootstrap method startup on aushelper@mozilla.org version 2.0
1497556538711	addons.xpi	DEBUG	Registering manifest for C:\Program Files\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1497556538712	addons.xpi	DEBUG	Calling bootstrap method startup on e10srollout@mozilla.org version 1.50
1497556538713	addons.xpi	DEBUG	Registering manifest for C:\Users\U6026612\AppData\Local\Temp\rust_mozprofile.J7Qpo9CrODj0\extensions\firebug@software.joehewitt.com
1497556538714	addons.xpi	DEBUG	Calling bootstrap method startup on firebug@software.joehewitt.com version 2.0.19
1497556538724	addons.xpi	DEBUG	Registering manifest for C:\Program Files\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1497556538725	addons.xpi	DEBUG	Calling bootstrap method startup on firefox@getpocket.com version 1.0.5
1497556538725	addons.xpi	DEBUG	Registering manifest for C:\Program Files\Mozilla Firefox\browser\features\screenshots@mozilla.org.xpi
1497556538726	addons.xpi	DEBUG	Calling bootstrap method startup on screenshots@mozilla.org version 6.6.0
1497556538726	addons.xpi	DEBUG	Registering manifest for C:\Program Files\Mozilla Firefox\browser\features\webcompat@mozilla.org.xpi
1497556538726	addons.xpi	DEBUG	Calling bootstrap method startup on webcompat@mozilla.org version 1.1
1497556538730	addons.manager	DEBUG	Registering shutdown blocker for XPIProvider
1497556538730	addons.manager	DEBUG	Provider finished startup: XPIProvider
1497556538730	addons.manager	DEBUG	Starting provider: LightweightThemeManager
1497556538730	addons.manager	DEBUG	Registering shutdown blocker for LightweightThemeManager
1497556538731	addons.manager	DEBUG	Provider finished startup: LightweightThemeManager
1497556538731	addons.manager	DEBUG	Starting provider: GMPProvider
1497556538737	addons.manager	DEBUG	Registering shutdown blocker for GMPProvider
1497556538738	addons.manager	DEBUG	Provider finished startup: GMPProvider
1497556538738	addons.manager	DEBUG	Starting provider: PluginProvider
1497556538738	addons.manager	DEBUG	Registering shutdown blocker for PluginProvider
1497556538738	addons.manager	DEBUG	Provider finished startup: PluginProvider
1497556538739	addons.manager	DEBUG	Completed startup sequence
1497556539723	addons.manager	DEBUG	Starting provider: <unnamed-provider>
1497556539723	addons.manager	DEBUG	Registering shutdown blocker for <unnamed-provider>
1497556539724	addons.manager	DEBUG	Provider finished startup: <unnamed-provider>
1497556539753	addons.manager	DEBUG	Starting provider: PreviousExperimentProvider
1497556539753	addons.manager	DEBUG	Registering shutdown blocker for PreviousExperimentProvider
1497556539753	addons.manager	DEBUG	Provider finished startup: PreviousExperimentProvider
1497556539972	DeferredSave.extensions.json	DEBUG	Write succeeded
1497556539972	addons.xpi-utils	DEBUG	XPI Database saved, setting schema version preference to 19
1497556539973	DeferredSave.extensions.json	DEBUG	Starting timer
1497556539996	DeferredSave.extensions.json	DEBUG	Starting write
1497556540020	DeferredSave.extensions.json	DEBUG	Write succeeded
[GPU 45900] WARNING: pipe error: 109: file c:/builds/moz2_slave/m-rel-w64-00000000000000000000/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 346
1497556541475	Marionette	DEBUG	loaded listener.js
Jun 15, 2017 3:55:41 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
1497556541895	Marionette	DEBUG	Received DOM event "beforeunload" for "about:blank"
1497556541943	Marionette	DEBUG	loaded listener.js
1497556542497	Marionette	DEBUG	Received DOM event "pagehide" for "about:blank"
1497556542497	Marionette	DEBUG	Received DOM event "unload" for "about:blank"
1497556542666	Marionette	DEBUG	Received DOM event "DOMContentLoaded" for "https://www.google.com/"
1497556543169	Marionette	DEBUG	Received observer notification "outer-window-destroyed" for "2147483659"
1497556543181	Marionette	DEBUG	Received DOM event "DOMContentLoaded" for "https://www.google.com/"
1497556543193	Marionette	DEBUG	Received DOM event "pageshow" for "https://www.google.com/"
1497556543660	Marionette	DEBUG	Received DOM event "pageshow" for "https://www.google.com/"
@andreastt
Copy link
Contributor

I think this was fixed in https://bugzilla.mozilla.org/show_bug.cgi?id=1367430, but you tested with an old Firefox. Can you try again with 55 or greater?

@BrandonDudek
Copy link
Author

Still an issue in 55.0b2.

@andreastt
Copy link
Contributor

Paging @mjzffr who has done work in this area.

@mjzffr
Copy link
Contributor

mjzffr commented Jun 16, 2017

@BrandonDude Hey, thanks for checking it in 55. I need some more information from you.

I need to see the request your client is making to the actions endpoint, but the trace log you originally posted seems to be truncated. Please post [a portion of] a log that shows at least shows the request payload like:

{"actions":[{"type":"keyDown","value":"a"},{"type":"keyUp","value":"a"}, ...]}

The other thing I'm wondering is whether this happens for only certain categories of key combinations. So for example you could compare the behaviour of Ctrl+n on the body, versus Ctrl+a in a text input.

@BrandonDudek
Copy link
Author

Here are the new logs. Ctrl+a also did nothing.

1497635484586 webdriver::server DEBUG -> POST /session/eb659eb1-2ddd-4a23-9f31-d3c7378a9134/url {"url":"https://www.google.com"}
1497635484586 geckodriver::marionette TRACE -> 44:[0,3,"get",{"url":"https://www.google.com"}]
1497635484587 Marionette TRACE 0 -> [0,3,"get",{"url":"https://www.google.com"}]
1497635484590 Marionette DEBUG Received DOM event "beforeunload" for "about:blank"
1497635485025 Marionette DEBUG Received DOM event "pagehide" for "about:blank"
1497635485026 Marionette DEBUG Received DOM event "unload" for "about:blank"
1497635485202 Marionette DEBUG Received DOM event "DOMContentLoaded" for "https://www.google.com/"
1497635485728 Marionette DEBUG Received observer notification "outer-window-destroyed" for "2147483659"
1497635485732 Marionette DEBUG Received DOM event "DOMContentLoaded" for "https://www.google.com/"
1497635485735 Marionette DEBUG Received DOM event "pageshow" for "https://www.google.com/"
1497635485953 Marionette DEBUG Received DOM event "pageshow" for "https://www.google.com/"
1497635485956 Marionette TRACE 0 <- [1,3,null,{}]
1497635485959 geckodriver::marionette TRACE <- [1,3,null,{}]
1497635485959 webdriver::server DEBUG <- 200 OK {"value": {}}
1497635485963 webdriver::server DEBUG -> GET /session/eb659eb1-2ddd-4a23-9f31-d3c7378a9134/alert/text
1497635485963 geckodriver::marionette TRACE -> 28:[0,4,"getTextFromDialog",{}]
1497635485964 Marionette TRACE 0 -> [0,4,"getTextFromDialog",{}]
1497635485966 Marionette TRACE 0 <- [1,4,{"error":"no such alert","message":"No modal dialog is currently open","stacktrace":"WebDriverError@chrome://marionette/content/error.js:222:5\nNoAlertOpenError@chrome://marionette/content/error.js:423:5\nGeckoDriver.prototype._checkIfAlertIsPresent@chrome://marionette/content/driver.js:2956:11\nGeckoDriver.prototype.getTextFromDialog@chrome://marionette/content/driver.js:2911:3\nexecute/req<@chrome://marionette/content/server.js:520:22\nTaskImpl_run@resource://gre/modules/Task.jsm:321:42\nTaskImpl@resource://gre/modules/Task.jsm:279:3\nasyncFunction@resource://gre/modules/Task.jsm:254:14\nTask_spawn@resource://gre/modules/Task.jsm:168:12\nexecute@chrome://marionette/content/server.js:510:15\nonPacket@chrome://marionette/content/server.js:481:7\n_onJSONObjectReady/<@chrome://marionette/content/transport.js:480:9\n"},null]
1497635485967 geckodriver::marionette TRACE <- [1,4,{"error":"no such alert","message":"No modal dialog is currently open","stacktrace":"WebDriverError@chrome://marionette/content/error.js:222:5\nNoAlertOpenError@chrome://marionette/content/error.js:423:5\nGeckoDriver.prototype._checkIfAlertIsPresent@chrome://marionette/content/driver.js:2956:11\nGeckoDriver.prototype.getTextFromDialog@chrome://marionette/content/driver.js:2911:3\nexecute/req<@chrome://marionette/content/server.js:520:22\nTaskImpl_run@resource://gre/modules/Task.jsm:321:42\nTaskImpl@resource://gre/modules/Task.jsm:279:3\nasyncFunction@resource://gre/modules/Task.jsm:254:14\nTask_spawn@resource://gre/modules/Task.jsm:168:12\nexecute@chrome://marionette/content/server.js:510:15\nonPacket@chrome://marionette/content/server.js:481:7\n_onJSONObjectReady/<@chrome://marionette/content/transport.js:480:9\n"},null]
1497635485969 webdriver::server DEBUG <- 400 Bad Request {"value":{"error":"no such alert","message":"No modal dialog is currently open","stacktrace":"stack backtrace:\n 0: 0x4bd56f - \n 1: 0x4bdcc9 - \n 2: 0x43dc4d - \n 3: 0x44db84 - \n 4: 0x44a1ca - \n 5: 0x4207bc - \n 6: 0x405e47 - \n 7: 0x6db3d9 - \n 8: 0x417847 - \n 9: 0x6d56d3 - \n 10: 0x77b359cd - BaseThreadInitThunk"}}
1497635485988 webdriver::server DEBUG -> POST /session/eb659eb1-2ddd-4a23-9f31-d3c7378a9134/execute/sync {"script":"return document.readyState;","args":[]}
1497635485989 geckodriver::marionette TRACE -> 134:[0,5,"executeScript",{"args":[],"newSandbox":false,"script":"return document.readyState;","scriptTimeout":null,"specialPowers":false}]
1497635485990 Marionette TRACE 0 -> [0,5,"executeScript",{"args":[],"newSandbox":false,"script":"return document.readyState;","scriptTimeout":null,"specialPowers":false}]
1497635485995 Marionette TRACE 0 <- [1,5,null,{"value":"complete"}]
1497635485997 geckodriver::marionette TRACE <- [1,5,null,{"value":"complete"}]
1497635485997 webdriver::server DEBUG <- 200 OK {"value":"complete"}
1497635486000 webdriver::server DEBUG -> POST /session/eb659eb1-2ddd-4a23-9f31-d3c7378a9134/element {"value":"/html/body","using":"xpath"}
1497635486000 geckodriver::marionette TRACE -> 58:[0,6,"findElement",{"using":"xpath","value":"/html/body"}]
1497635486001 Marionette TRACE 0 -> [0,6,"findElement",{"using":"xpath","value":"/html/body"}]
1497635486006 Marionette TRACE 0 <- [1,6,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"59be7681-7abc-4a66-8ed5-ea66a3d739b4","ELEMENT":"59be7681-7abc-4a66-8ed5-ea66a3d739b4"}}]
1497635486007 geckodriver::marionette TRACE <- [1,6,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"59be7681-7abc-4a66-8ed5-ea66a3d739b4","ELEMENT":"59be7681-7abc-4a66-8ed5-ea66a3d739b4"}}]
1497635486007 webdriver::server DEBUG <- 200 OK {"value":{"element-6066-11e4-a52e-4f735466cecf":"59be7681-7abc-4a66-8ed5-ea66a3d739b4"}}
1497635486017 webdriver::server DEBUG -> POST /session/eb659eb1-2ddd-4a23-9f31-d3c7378a9134/element/59be7681-7abc-4a66-8ed5-ea66a3d739b4/value {"id":"59be7681-7abc-4a66-8ed5-ea66a3d739b4","text":"n","value":["","n",""]}
1497635486018 geckodriver::marionette TRACE -> 114:[0,7,"sendKeysToElement",{"id":"59be7681-7abc-4a66-8ed5-ea66a3d739b4","text":"n","value":["","n",""]}]
1497635486018 Marionette TRACE 0 -> [0,7,"sendKeysToElement",{"id":"59be7681-7abc-4a66-8ed5-ea66a3d739b4","text":"n","value":["","n",""]}]
1497635486071 Marionette TRACE 0 <- [1,7,null,{}]
1497635486073 geckodriver::marionette TRACE <- [1,7,null,{}]
1497635486073 webdriver::server DEBUG <- 200 OK {"value": {}}
1497635486076 webdriver::server DEBUG -> POST /session/eb659eb1-2ddd-4a23-9f31-d3c7378a9134/element/59be7681-7abc-4a66-8ed5-ea66a3d739b4/value {"id":"59be7681-7abc-4a66-8ed5-ea66a3d739b4","text":"w","value":["","","w",""]}
1497635486076 geckodriver::marionette TRACE -> 123:[0,8,"sendKeysToElement",{"id":"59be7681-7abc-4a66-8ed5-ea66a3d739b4","text":"w","value":["","","w",""]}]
1497635486079 Marionette TRACE 0 -> [0,8,"sendKeysToElement",{"id":"59be7681-7abc-4a66-8ed5-ea66a3d739b4","text":"w","value":["","","w",""]}]
1497635486094 Marionette TRACE 0 <- [1,8,null,{}]
1497635486095 geckodriver::marionette TRACE <- [1,8,null,{}]
1497635486095 webdriver::server DEBUG <- 200 OK {"value": {}}
1497635486098 webdriver::server DEBUG -> POST /session/eb659eb1-2ddd-4a23-9f31-d3c7378a9134/element {"value":"#lst\-ib","using":"css selector"}
1497635486098 geckodriver::marionette TRACE -> 64:[0,9,"findElement",{"using":"css selector","value":"#lst\-ib"}]
1497635486098 Marionette TRACE 0 -> [0,9,"findElement",{"using":"css selector","value":"#lst\-ib"}]
1497635486104 Marionette TRACE 0 <- [1,9,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"fdc8a5aa-bbdb-47e1-97a2-891907c8e67f","ELEMENT":"fdc8a5aa-bbdb-47e1-97a2-891907c8e67f"}}]
1497635486105 geckodriver::marionette TRACE <- [1,9,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"fdc8a5aa-bbdb-47e1-97a2-891907c8e67f","ELEMENT":"fdc8a5aa-bbdb-47e1-97a2-891907c8e67f"}}]
1497635486105 webdriver::server DEBUG <- 200 OK {"value":{"element-6066-11e4-a52e-4f735466cecf":"fdc8a5aa-bbdb-47e1-97a2-891907c8e67f"}}
1497635486124 webdriver::server DEBUG -> POST /session/eb659eb1-2ddd-4a23-9f31-d3c7378a9134/element/fdc8a5aa-bbdb-47e1-97a2-891907c8e67f/value {"id":"fdc8a5aa-bbdb-47e1-97a2-891907c8e67f","text":"asd","value":["a","s","d"]}
1497635486125 geckodriver::marionette TRACE -> 107:[0,10,"sendKeysToElement",{"id":"fdc8a5aa-bbdb-47e1-97a2-891907c8e67f","text":"asd","value":["a","s","d"]}]
1497635486125 Marionette TRACE 0 -> [0,10,"sendKeysToElement",{"id":"fdc8a5aa-bbdb-47e1-97a2-891907c8e67f","text":"asd","value":["a","s","d"]}]
1497635486160 Marionette TRACE 0 <- [1,10,null,{}]
1497635486162 geckodriver::marionette TRACE <- [1,10,null,{}]
1497635486162 webdriver::server DEBUG <- 200 OK {"value": {}}
1497635490110 webdriver::server DEBUG -> POST /session/eb659eb1-2ddd-4a23-9f31-d3c7378a9134/element/fdc8a5aa-bbdb-47e1-97a2-891907c8e67f/value {"id":"fdc8a5aa-bbdb-47e1-97a2-891907c8e67f","text":"xyz","value":["x","y","z"]}
1497635490110 geckodriver::marionette TRACE -> 107:[0,11,"sendKeysToElement",{"id":"fdc8a5aa-bbdb-47e1-97a2-891907c8e67f","text":"xyz","value":["x","y","z"]}]
1497635490112 Marionette TRACE 0 -> [0,11,"sendKeysToElement",{"id":"fdc8a5aa-bbdb-47e1-97a2-891907c8e67f","text":"xyz","value":["x","y","z"]}]
1497635490143 Marionette TRACE 0 <- [1,11,null,{}]
1497635490144 geckodriver::marionette TRACE <- [1,11,null,{}]
1497635490144 webdriver::server DEBUG <- 200 OK {"value": {}}
1497635491685 webdriver::server DEBUG -> POST /session/eb659eb1-2ddd-4a23-9f31-d3c7378a9134/element/fdc8a5aa-bbdb-47e1-97a2-891907c8e67f/value {"id":"fdc8a5aa-bbdb-47e1-97a2-891907c8e67f","text":"a","value":["","a",""]}
1497635491686 geckodriver::marionette TRACE -> 115:[0,12,"sendKeysToElement",{"id":"fdc8a5aa-bbdb-47e1-97a2-891907c8e67f","text":"a","value":["","a",""]}]
1497635491688 Marionette TRACE 0 -> [0,12,"sendKeysToElement",{"id":"fdc8a5aa-bbdb-47e1-97a2-891907c8e67f","text":"a","value":["","a",""]}]
1497635491849 Marionette TRACE 0 <- [1,12,null,{}]
1497635491850 geckodriver::marionette TRACE <- [1,12,null,{}]
1497635491850 webdriver::server DEBUG <- 200 OK {"value": {}}

@mjzffr
Copy link
Contributor

mjzffr commented Jun 16, 2017

@ato Okay, so this involves the sendKeysToElement endpoint. It looks like #646 to me. Most likely the modifiers-key properties aren't set correctly when calling into event.js.

@yucer
Copy link

yucer commented Aug 2, 2017

Hello, how can I help with this ?

I'd made a python script to reproduce the problem using the RemoteWebDriver.

Can you check the settings ? Do you have some other test script to reproduce it ?

The server side (selenium) log during initialization:

selenium    | 13:45:51.165 INFO - Done: [new session: Capabilities [{firefox_binary=/var/lib/selenium/bin/firefoxes/55.0b11/firefox, marionette=true, acceptInsecureCerts=true, browserName=firefox, moz:firefoxOptions={args=[--display=:101], log={level=trace}, profile=UEsDBBQAAAAIALd9Aku1Px02gAQAA...}, version=55.0b11, platform=LINUX}]]
selenium    | 13:45:51.191 INFO - Executing: [implicitly wait: 1000])
selenium    | 13:45:51.207 INFO - Done: [implicitly wait: 1000]
selenium    | 13:45:51.223 INFO - Executing: [maximise window])
selenium    | 13:45:51.322 INFO - Done: [maximise window]
selenium    | 13:45:51.333 INFO - Executing: [get: about:])
selenium    | 1501681551351	Marionette	DEBUG	Received DOM event "beforeunload" for "about:blank"
selenium    | 1501681551393	Marionette	DEBUG	Received DOM event "pagehide" for "about:blank"
selenium    | 1501681551394	Marionette	DEBUG	Received DOM event "unload" for "about:blank"
selenium    | 1501681551397	Marionette	DEBUG	Received observer notification "outer-window-destroyed" for "2147483649"
selenium    | 1501681551521	addons.productaddons	INFO	Completed downloading document
selenium    | 13:45:51.599 INFO - Done: [get: about:]
selenium    | 1501681551727	addons.productaddons	INFO	downloadXHR File download. status=200
selenium    | 1501681551733	addons.productaddons	INFO	Downloaded file will be saved to /tmp/tmpaddon
selenium    | 13:45:55.617 INFO - Executing: [get: http://www.google.com])
selenium    | 1501681555995	Marionette	DEBUG	loaded listener.js
selenium    | 1501681556756	Marionette	DEBUG	Received DOM event "DOMContentLoaded" for "https://www.google.de/?gfe_rd=cr&ei=lNeBWcvKC6708AeNkoeYDA&gws_rd=ssl"
selenium    | 1501681557432	Marionette	DEBUG	Received DOM event "pageshow" for "https://www.google.de/?gfe_rd=cr&ei=lNeBWcvKC6708AeNkoeYDA&gws_rd=ssl"
selenium    | 13:45:57.443 INFO - Done: [get: http://www.google.com]

On the other side the script sets the python log level to DEBUG, so I get the requests made to the server.

Attempt #1: Send <CTRL> + <t>. Press Enter to perform.

DEBUG:selenium.webdriver.remote.remote_connection:POST http://172.17.0.2:4444/wd/hub//session/0d977824-4f10-4bd7-b0a0-07a019991db0/element {"using": "tag name", "sessionId": "0d977824-4f10-4bd7-b0a0-07a019991db0", "value": "body"}
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
DEBUG:selenium.webdriver.remote.remote_connection:POST http://172.17.0.2:4444/wd/hub//session/0d977824-4f10-4bd7-b0a0-07a019991db0/element/0/value {"text": "\ue009t", "sessionId": "0d977824-4f10-4bd7-b0a0-07a019991db0", "id": "0", "value": ["\ue009", "t"]}
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request

I did also try to send the corresponding action chains:

Attempt #2: Send <CTRL> + <t> using ACTION CHAINS. Press Enter to perform.

DEBUG:selenium.webdriver.remote.remote_connection:POST http://172.17.0.2:4444/wd/hub//session/0d977824-4f10-4bd7-b0a0-07a019991db0/keys {"sessionId": "0d977824-4f10-4bd7-b0a0-07a019991db0", "value": ["\ue009"]}
DEBUG:selenium.webdriver.remote.remote_connection:Finished Request
Traceback (most recent call last):
  File "./new_tab2.py", line 78, in <module>
    ActionChains(driver).key_down(Keys.CONTROL).send_keys('t').key_up(Keys.CONTROL).perform()
  File "/home/yucer/.virtualenvs/selenium/local/lib/python2.7/site-packages/selenium/webdriver/common/action_chains.py", line 80, in perform
    action()
  File "/home/yucer/.virtualenvs/selenium/local/lib/python2.7/site-packages/selenium/webdriver/common/action_chains.py", line 232, in <lambda>
    {"value": keys_to_typing(value)}))
  File "/home/yucer/.virtualenvs/selenium/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 256, in execute
    self.error_handler.check_response(response)
  File "/home/yucer/.virtualenvs/selenium/local/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: sendKeysToActiveElement
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: '41a3ac501368', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-75-generic', java.version: '1.8.0_131'
Driver info: driver.version: RemoteWebDriver
Stacktrace:
    at org.openqa.selenium.remote.http.AbstractHttpCommandCodec.encode (AbstractHttpCommandCodec.java:220)
    at org.openqa.selenium.remote.http.AbstractHttpCommandCodec.encode (AbstractHttpCommandCodec.java:118)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute (HttpCommandExecutor.java:158)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute (DriverCommandExecutor.java:82)
    at org.openqa.selenium.remote.RemoteWebDriver.execute (RemoteWebDriver.java:637)
    at org.openqa.selenium.remote.RemoteExecuteMethod.execute (RemoteExecuteMethod.java:35)
    at org.openqa.selenium.remote.RemoteKeyboard.sendKeys (RemoteKeyboard.java:35)
    at org.openqa.selenium.support.events.internal.EventFiringKeyboard.sendKeys (EventFiringKeyboard.java:42)
    at org.openqa.selenium.remote.server.handler.interactions.SendKeyToActiveElement.call (SendKeyToActiveElement.java:56)
    at org.openqa.selenium.remote.server.handler.interactions.SendKeyToActiveElement.call (SendKeyToActiveElement.java:31)
    at java.util.concurrent.FutureTask.run (FutureTask.java:266)
    at org.openqa.selenium.remote.server.DefaultSession$1.run (DefaultSession.java:176)
    at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:617)
    at java.lang.Thread.run (Thread.java:748)

and the selenium log for that error:

selenium    | 13:51:58.736 INFO - Executing: [send keys to active: [?]])
selenium    | 13:51:58.746 WARN - Exception thrown
selenium    | org.openqa.selenium.UnsupportedCommandException: sendKeysToActiveElement
selenium    | Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
selenium    | System info: host: '41a3ac501368', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-75-generic', java.version: '1.8.0_131'
selenium    | Driver info: driver.version: RemoteWebDriver
selenium    | 	at org.openqa.selenium.remote.http.AbstractHttpCommandCodec.encode(AbstractHttpCommandCodec.java:220)
selenium    | 	at org.openqa.selenium.remote.http.AbstractHttpCommandCodec.encode(AbstractHttpCommandCodec.java:118)
selenium    | 	at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
selenium    | 	at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
selenium    | 	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637)
selenium    | 	at org.openqa.selenium.remote.RemoteExecuteMethod.execute(RemoteExecuteMethod.java:35)
selenium    | 	at org.openqa.selenium.remote.RemoteKeyboard.sendKeys(RemoteKeyboard.java:35)
selenium    | 	at org.openqa.selenium.support.events.internal.EventFiringKeyboard.sendKeys(EventFiringKeyboard.java:42)
selenium    | 	at org.openqa.selenium.remote.server.handler.interactions.SendKeyToActiveElement.call(SendKeyToActiveElement.java:56)
selenium    | 	at org.openqa.selenium.remote.server.handler.interactions.SendKeyToActiveElement.call(SendKeyToActiveElement.java:31)
selenium    | 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
selenium    | 	at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
selenium    | 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
selenium    | 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
selenium    | 	at java.lang.Thread.run(Thread.java:748)
selenium    | 13:51:58.751 WARN - Exception: sendKeysToActiveElement
selenium    | Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
selenium    | System info: host: '41a3ac501368', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-75-generic', java.version: '1.8.0_131'
selenium    | Driver info: driver.version: RemoteWebDriver

Is that normal ?

@yucer
Copy link

yucer commented Aug 3, 2017

Ok I have now reproduced the test case In Java. In order see if it was just a problem of the python binding implementation. The problem still happens.

Geckodriver: 0.18.0
Firefox: 55.0b11
Selenium: selenium-java-3.4.0.zip

My setup was like this one, but for Linux.

The log is the following:

Aug 03, 2017 10:36:44 AM org.openqa.selenium.firefox.FirefoxOptions toCapabilities
INFO: Preferring the firefox binary in these options (/home/yucer/Downloads/softlib/firefoxes/55.0b11/firefox rather than /home/yucer/Downloads/softlib/firefoxes/55.0b11/firefox)
Aug 03, 2017 10:36:44 AM org.openqa.selenium.firefox.FirefoxOptions toCapabilities
INFO: Preferring the firefox binary in these options (/home/yucer/Downloads/softlib/firefoxes/55.0b11/firefox rather than /home/yucer/Downloads/softlib/firefoxes/55.0b11/firefox)
1501749404487	geckodriver	INFO	geckodriver 0.18.0
1501749404487	webdriver::httpapi	DEBUG	Creating routes
1501749404504	geckodriver	INFO	Listening on 127.0.0.1:22667
1501749404805	webdriver::server	DEBUG	-> POST /session {
  "desiredCapabilities": {
    "firefox_binary": {
      "extraEnv": {},
      "hCode": 19986569,
      "class": "org.openqa.selenium.firefox.FirefoxBinary",
      "timeout": 45000
    },
    "marionette": true,
    "acceptInsecureCerts": true,
    "browserName": "firefox",
    "moz:firefoxOptions": {
      "binary": "/home/yucer/Downloads/softlib/firefoxes/55.0b11/firefox",
      "prefs": {
        "--log": "debug"
      },
      "args": []
    },
    "version": "",
    "platform": "ANY"
  },
  "requiredCapabilities": {},
  "capabilities": {
    "desiredCapabilities": {
      "firefox_binary": {
        "extraEnv": {},
        "hCode": 19986569,
        "class": "org.openqa.selenium.firefox.FirefoxBinary",
        "timeout": 45000
      },
      "marionette": true,
      "acceptInsecureCerts": true,
      "browserName": "firefox",
      "moz:firefoxOptions": {
        "binary": "/home/yucer/Downloads/softlib/firefoxes/55.0b11/firefox",
        "prefs": {
          "--log": "debug"
        },
        "args": []
      },
      "version": "",
      "platform": "ANY"
    },
    "requiredCapabilities": {},
    "alwaysMatch": {
      "acceptInsecureCerts": true
    },
    "firstMatch": [
      {
        "browserName": "firefox",
        "moz:firefoxOptions": {
          "binary": "/home/yucer/Downloads/softlib/firefoxes/55.0b11/firefox",
          "prefs": {
            "--log": "debug"
          },
          "args": []
        }
      }
    ]
  }
}
1501749404921	geckodriver::capabilities	DEBUG	Trying to read firefox version from ini files
1501749404922	geckodriver::capabilities	DEBUG	Found version 55.0
1501749404929	geckodriver::marionette	INFO	Starting browser /home/yucer/Downloads/softlib/firefoxes/55.0b11/firefox with args ["-marionette"]
1501749405704	Marionette	DEBUG	Received observer notification "profile-after-change"
1501749405758	Marionette	DEBUG	Received observer notification "command-line-startup"
1501749405758	Marionette	INFO	Enabled via --marionette
1501749407182	Marionette	DEBUG	Received observer notification "sessionstore-windows-restored"
1501749407182	Marionette	DEBUG	Received observer notification "sessionstore-windows-restored"
1501749407515	Marionette	DEBUG	Setting recommended pref toolkit.cosmeticAnimations.enabled to false
1501749407516	Marionette	DEBUG	Setting recommended pref datareporting.policy.dataSubmissionPolicyAccepted to false
1501749407517	Marionette	INFO	Listening on port 46861
1501749407544	geckodriver::marionette	DEBUG	Connected to Marionette on localhost:46861
1501749407549	Marionette	DEBUG	Accepted connection 0 from 127.0.0.1:53292
JavaScript error: chrome://marionette/content/server.js, line 337: NS_ERROR_SOCKET_ADDRESS_IN_USE: Component returned failure code: 0x804b0036 (NS_ERROR_SOCKET_ADDRESS_IN_USE) [nsIServerSocket.initSpecialConnection]
1501749407563	Marionette	CONFIG	Matched capabilities: {"browserName":"firefox","browserVersion":"55.0","platformName":"linux","platformVersion":"4.4.0-75-generic","pageLoadStrategy":"normal","acceptInsecureCerts":true,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"rotatable":false,"specificationLevel":0,"moz:processID":20632,"moz:profile":"/tmp/rust_mozprofile.YK2y6hemSkKi","moz:accessibilityChecks":false}
1501749407563	Marionette	WARN	TLS certificate errors will be ignored for this session
1501749407590	Marionette	DEBUG	loaded listener.js
1501749407603	webdriver::server	DEBUG	<- 200 OK {"value": {"sessionId":"360426d6-9ffa-4830-83a1-c6a1945d49f2","capabilities":{"acceptInsecureCerts":true,"browserName":"firefox","browserVersion":"55.0","moz:accessibilityChecks":false,"moz:processID":20632,"moz:profile":"/tmp/rust_mozprofile.YK2y6hemSkKi","pageLoadStrategy":"normal","platformName":"linux","platformVersion":"4.4.0-75-generic","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}}}}
Aug 03, 2017 10:36:47 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
1501749407698	webdriver::server	DEBUG	-> POST /session/360426d6-9ffa-4830-83a1-c6a1945d49f2/url {"url":"http://www.google.com"}
1501749407704	Marionette	DEBUG	Received DOM event "beforeunload" for "chrome://browser/content/browser.xul"
1501749408133	Marionette	DEBUG	Received DOM event "pagehide" for "chrome://browser/content/browser.xul"
1501749408133	Marionette	DEBUG	Received DOM event "unload" for "chrome://browser/content/browser.xul"
1501749408387	Marionette	DEBUG	Received DOM event "DOMContentLoaded" for "https://www.google.de/?gfe_rd=cr&ei=n-CCWd61LIjH8AfaiIHoCg&gws_rd=ssl"
1501749409150	Marionette	DEBUG	Received DOM event "pageshow" for "https://www.google.de/?gfe_rd=cr&ei=n-CCWd61LIjH8AfaiIHoCg&gws_rd=ssl"
1501749409173	webdriver::server	DEBUG	<- 200 OK {"value": {}}
Press ENTER to Select the element.
1501749415319	webdriver::server	DEBUG	-> POST /session/360426d6-9ffa-4830-83a1-c6a1945d49f2/element {"value":"#lst\\-ib","using":"css selector"}
1501749415329	webdriver::server	DEBUG	<- 200 OK {"value":{"element-6066-11e4-a52e-4f735466cecf":"f6ea5560-4de8-452a-9f70-e6e5db704780"}}
Press ENTER to Send <CTRL> + <t>:
1501749421712	webdriver::server	DEBUG	-> POST /session/360426d6-9ffa-4830-83a1-c6a1945d49f2/element/f6ea5560-4de8-452a-9f70-e6e5db704780/value {"id":"f6ea5560-4de8-452a-9f70-e6e5db704780","text":"t","value":["","t"]}
1501749421787	Marionette	DEBUG	loaded listener.js
1501749421883	Marionette	DEBUG	loaded listener.js

Key combination <CTRL> + <t> was sent to the browser.
1501749421941	webdriver::server	DEBUG	<- 200 OK {"value": {}}

Press ENTER to close the browser

@yucer
Copy link

yucer commented Aug 3, 2017

Also could SeleniumHQ/selenium#2106 also be related with the problem ?

@yucer
Copy link

yucer commented Aug 8, 2017

I have been trying to look more info that can help you.

I did make these Marionette tests and verified that it it seems to be not the same case that #646

The SHIFT key seem to work for marionette, but the CONTROL key not.

Maybe is a new restriction of firefox? As long as I understood, they try to use all the window-related operations via chrome context. Look here in the section: Important Concepts.

Essentially, in the browser, there are two places you can interact with: 'content' and 'chrome'. Content is the websites you interact with, all the html and the webpage's DOM.

Chrome is the browser specific stuff like the navigation bar and the scrollbar, ie, the things that live outside of the webpage itself. Code that is executed here has many privileges, privileges that code in content space doesn't have access to, like creating local files.

Under those precepts, maybe it is not allowed now that an event sent to an element of the content result in an action at chrome level.

How are those concepts mapped to the Webdriver standard ?

@andreastt
Copy link
Contributor

Holding down control is supposed to be possible in content context and this is supposed to affect the subsequent keys’ modifier state. However, it is not supposed to be possible to interact with the surrounding system or the browser chrome—such as system menus, other applications, the context menu, or browser controls—when using this API from content.

When Marionette is in chrome context mode you gain additional privileges that lets you interact with XUL windows and XUL widgets. Chrome space in Firefox is just another web document with a DOM from which you can locate buttons and menus using the same primitives you would normally use with WebDriver for web content. Within this context it is possible to also interact with Firefox UI.

Internally, Marionette uses nsIDOMWindowUtils to synthesise event. This bypasses the operating system input queue, which means it is not possible to e.g. use the action API to interact with the surrounding system or native widget controls. On the other hand, because the input is synthesised, it is possible to use WebDriver instructions to interact with hidden Firefox windows, and Firefox windows that are headless (using the -headless command line flag).

@yucer
Copy link

yucer commented Aug 9, 2017

Ok, I did add this other test to the my local marionette tests around the issue.

    def test_undo_via_element_sendkeys(self):
        self.reporter_element.send_keys("abcdef" + Keys.CONTROL + "z" + Keys.CONTROL + "123456")
        self.assertEqual(self.key_reporter_value, "123456")

and also tested it via a code snippet using selenium java and it worked.

So it seems is not a problem of the <CTRL> key. This issue report might be motivated by the fact that the <CTRL> + <T> combination was being used by some people like me to open new tabs in their tests.

So far as I have seen this other problem is more specific and its a change of behavior inside Firefox. Maybe it is good to have a note or a list of all those combinations that doesn't work, or why some of them doesn't work.

Or maybe a warning at some level that says that this chrome operations are not allowed, when they are triggered from a content context.

@yucer
Copy link

yucer commented Aug 9, 2017

I did compare the two cases:

  1. The case with CTRL + Z working good.

  2. The case with CTRL + T failing. (right side)

ctrl_keys_code

and that generated this change in the logs during the sending of the CONTROL key combinations:

  1. The log with CTRL + Z working good.

  2. The log with CTRL + T failing. (right side)

ctr_keys_log

we have just an extra log line in the failing case during the sending of <CTRL> + <T>:

geckodriver::marionette TRACE <- [1,5,null,{}]
that seems to be the same output of Marionette, the curious stuff is why is not present in the log during the execution of the working case (<CTRL> + <Z>). Maybe there is some extra log command in geckodriver when marionette return an error status, but the actual error message is not being returned.

Also the failing case include this extra line:

[Child 1292] WARNING: pipe error (15): Connection reset by peer: file /home/worker/workspace/build/src/ipc/chromium/src/chrome/common/ipc_channel_posix.cc, line 353

Does it means that at the moment of closing the browser there was an extra process running ?

Might that is related with this Tab selection in multiprocess Firefox ? Multiprocess Firefox is something relatively new.

@yucer
Copy link

yucer commented Aug 11, 2017

More info:

I have made a test disabling the multiprocess feature of Firefox and the <CTRl> + <T> key combination work as before. I made that using:

 		options.addPreference("browser.tabs.remote.autostart", false);
 		options.addPreference("browser.tabs.remote.autostart.1", false);
 		options.addPreference("browser.tabs.remote.autostart.2", false);

So as long as I see this is not a problem from the geckodriver, although it would be good to know how are we supposed to open a new tab using geckodriver.

In the meanwhile I am going to disable that feature for the tests that use new tabs, in the cases that I need that.

But this seems not to be a geckodriver problem, so you might want to close the ticket.

@whimboo
Copy link
Collaborator

whimboo commented Aug 14, 2017

Ctrl-T is not a shortcut which is allowed to run from content. So you shouldn't use it for opening a new tab. I don't see why the multi-process feature should make a difference here, and why it should work when you turn it off.

As we are aware on bug 380637 some websites override those shortcuts. There is still no appropriate fix for that available.

If you want to open a new tab you can first load a HTML testcase like https://dxr.mozilla.org/mozilla-central/source/testing/marionette/harness/marionette_harness/www/windowHandles.html which can open a new tab by just clicking an element on the page.

@yucer
Copy link

yucer commented Aug 14, 2017

Ctrl-T is not a shortcut which is allowed to run from content.

That's my point. But it was allowed until recent versions, as you can see in the forums. We did also use it, until we did decide to upgrade Firefox and Selenium. It did stop working then.

So you shouldn't use it for opening a new tab.

Ok, I can understand that we shouldn't use it anymore. That's why I was asking the right way to do it. Something confuses me here though: As long as I understand, the geckodriver is conceived to implement only the Webdriver standard, and not all the chrome features.

But the standard covers some sections to handle windows, and that is supposed to be from chrome. Does it mean that more chrome functions can be added to the standard (like handling tabs) as long as it is needed and agreed by all the browsers ?

I don't see why the multi-process feature should make a difference here, and why it should work when you turn it off.

I don't see it neither. But it does. You can run the code that I submitted in my last comment and comment the lines where I disable the multiprocess stuff. As a matter of fact I did come to that conclusion because there was an extra log line when I send <CTRL> + <T> to the element warning about a child process that seem not to be properly closed. That log line didn't appear when I send <CTRL> + <Z>. The java code to reproduce those cases are referenced in that comment.

As we are aware on bug 380637 some websites override those shortcuts. There is still no appropriate fix for that available.

This seems not to be the problem in this case. During the tests, I can click by myself in the tab, press <CTRL> + <T> and it works correctly. I suppose that, in case of overridden shortcuts then it wouldn't work when I do it manually neither.

If you want to open a new tab you can first load a HTML testcase like https://dxr.mozilla.org/mozilla-central/source/testing/marionette/harness/marionette_harness/www/windowHandles.html which can open a new tab by just clicking an element on the page.

I would, but that doesn't work always. Depending on the setting of the browsers int can mean "open a new Window". And that's because there is a missing information in this spec: target="_blank". There aren't target="_blank_window" and target="_blank_tab", the current meaning is more like open a blank document. A new spec in the Webdriver standard or Javascript regarding this missing info might be useful.

An additional problem is that the settings involved are frozen in the selenium profile, and for some reason they are set to open a new window in the last selenium. The implementation using Firefox options is not clear to me using the python binding. You can check more about it here: SeleniumHQ/selenium#2106

@whimboo
Copy link
Collaborator

whimboo commented Aug 18, 2017

As long as I understand, the geckodriver is conceived to implement only the Webdriver standard, and not all the chrome features.

Yes, geckodriver implements the webdriver spec but on top of that each driver is allowed to specify custom commands. But those have to be put into a custom namespace. For us those commands end up at /session/{sessionId}/moz/*. It's needed because we also have Selenium tests for driving the Firefox chrome. So tools like FoxPuppet need that.

conclusion because there was an extra log line when I send + to the element warning about a child process that seem not to be properly closed. That log line didn't appear when I send + .

That's because Ctrl+Z operates in content for text fields and any content-editable element. Maybe you could have a look at which version of Firefox that behavior started? We could then see if that change was intended or not.

This seems not to be the problem in this case. During the tests, I can click by myself in the tab, press + and it works correctly. I suppose that, in case of overridden shortcuts then it wouldn't work when I do it manually neither.

Good point. If you could do the above check with older versions of Firefox I can help once we know what's going on.

I would, but that doesn't work always. Depending on the setting of the browsers int can mean "open a new Window".

I see. Maybe for now just tweak the preferences with firefoxOptions?

The implementation using Firefox options is not clear to me using the python binding. You can check more about it here: SeleniumHQ/selenium#2106

You can do this like:

        capabilities["moz:firefoxOptions"] = {
            "log": {
                "level": "trace",
            },
            "prefs": {
                "browser.link.open_newwindow": 3,
            }

@gwtuser
Copy link

gwtuser commented Oct 28, 2017

I'm seeing Actions.sendKeys(Keys.CONTROL + "C" + Keys.CONTROL) fail in FF56 + geckodriver v18 or v19 but succeed in LegacyMode in FF56 (Selenium v3.5.3). Can anyone else confirm this? (Sequence should do a copy.)

@gwtuser
Copy link

gwtuser commented Oct 29, 2017

If I created a new issue specifically about Keys.CONTROL + "C" + Keys.CONTROL not working, I suppose it would just be closed as a duplicate of this issue, because in the title at least, it's not specific, though it appears the OP was interested mainly in sending a CONTROL "T".

However, I'm tempted to create a new issue because I can't understand how a major issue like this has been sitting idle for months This is an absolute showstopper for us as we can't move from Legacy mode without this working.

Is it at least known whether this is an issue in geckodriver or in WebDriver?

@BrandonDudek
Copy link
Author

BrandonDudek commented Oct 30, 2017

[Ctrl + T] is still an issue in Selenium 3.5.3, GeckoDriver 0.19, and Firefox 56.0.2.
Also an issue for [Ctrl + N], [Ctrl + W], and [Ctrl + -] (minus).

@andreastt
Copy link
Contributor

Control + T for opening a new tab, and generally any command that interacts with the chrome of Firefox, are explicitly not meant to work.

@BrandonDudek
Copy link
Author

@andreastt, the issue is that they use to work, and are very helpful for Selenium users.

@andreastt
Copy link
Contributor

@BrandonDude WebDriver targets web content automation, and that interacts with Firefox UI, which is outside that realm. You need to switch to chrome context for key bindings to have any effect on the surrounding chrome.

@GARMBoshouwers
Copy link

Our application uses Control-clicks to activate certain functionalities. This also does not work using the FireFox WebDriver. This does work using the Chrome WebDriver.

Is there some information about switching to chrome context in Selenium? I cannot find anything using a naive google query.

@whimboo
Copy link
Collaborator

whimboo commented Nov 1, 2017

@GARMBoshouwers your information is very generic, and without telling us which kind of clicks you are using, we cannot help.

Regarding the general issue for opening a new tab or window I just filed w3c/webdriver#1138, so we may be able to get a new command added to the webdriver specification. You may vote if you are interested in.

Is there some information about switching to chrome context in Selenium? I cannot find anything using a naive google query.

I cannot speak about bindings other then Python, but for the latter there is driver.context() available. It accepts a parameter of the context to switch to. Those are driver.CONTEXT_CHROME, and driver.CONTEXT_CONTENT. This should help as workaround for now.

@gwtuser
Copy link

gwtuser commented Nov 3, 2017

"Control + T for opening a new tab, and generally any command that interacts with the chrome of Firefox, are explicitly not meant to work."

What about Control + C and Control + V (cut and paste) that I mentioned above? Are they meant to work? Is someone working on fixing them? That falls under the scope of this Issue as the title appears to be agnostic with respect to which keys are sent with the chord.

I'm referring to FF56, but also note that in this (chrome-specific) issue, the dev told him to report the issue against chromedriver - should this issue be reported against geckodriver? (It works in legacy mode, and also used to work for Chrome in WebDriver v2).

@andreastt
Copy link
Contributor

andreastt commented Nov 3, 2017

@gwtuser As I understand it, they are not intended to work either.

@gwtuser
Copy link

gwtuser commented Nov 4, 2017

Well it's disappointing that existing functionality that worked in WebDriver 2.x is now intentionally broken. It may mean WebDriver is a dead end for our customers. I suppose I can file a bug against geckodriver and see if that leads anywhere.

@andreastt
Copy link
Contributor

It is my impression that allowing the driver to interact with the surrounding system, outside of the web content, is a big security risk considering that WebDriver is an RPC mechanism.

@gwtuser
Copy link

gwtuser commented Nov 5, 2017

OK, I think I may have a workaround that could help other users. The following sequences work in Legacy FF mode, but not under the new geckodriver-driven mode, where they seem to fail with no error message:

Actions.sendKeys.(Keys.CONTROL + "C" + Keys.CONTROL);
Actions.sendKeys(Keys.chord( Keys.CONTROL, "C" ));

However, the following works under the new geckodriver-driven mode:
Actions.keyDown(Keys.CONTROL).sendKeys("C").keyUp(Keys.CONTROL);

So, one way to get existing sequences like the top one I listed working under the new geckodriver-driven mode is to manually parse out modifier keys and execute them in the manner of the function composition form listed. This begs the question - if I can do it that way, then it not working the first two ways is not a security issue, so why was that use case broken in WebDriver 3.x?

@whimboo
Copy link
Collaborator

whimboo commented Nov 8, 2017

What about Control + C and Control + V (cut and paste) that I mentioned above? Are they meant to work? Is someone working on fixing them? That falls under the scope of this Issue as the title appears to be agnostic with respect to which keys are sent with the chord.

AFAIK those should work given that they operate in the content context. And as we have just seen it seems to work when control is pressed separately from the real key.

I don't know about actions yet and would have to defer to @andreastt or @jgraham in how it is intended to work.

@mjzffr
Copy link
Contributor

mjzffr commented Nov 8, 2017

@gwtuser Sequences like ^C ^V are meant to work in content scope (e.g. in a web form field) and they do. I just wrote some web-platform tests to confirm this. See https://bugzilla.mozilla.org/show_bug.cgi?id=1415694

It's possible that the issue you're encountering is a bug in the client. (e.g. something like #888) Feel free to open a new issue specific to your problem and post trace-level logs so we can see what payload is actually being processed by geckodriver/marionette.

Key chords do work in geckodriver as far as I can tell, and this discussion covers too many different cases, so closing.

@yucer
Copy link

yucer commented Nov 28, 2017

Just for the record.

Those who are looking for a workaround, deactivate the multiprocess feature of Firefox works for us.

The behavior I did observe is that somehow a process for the new Tab is open, and maybe loaded but not shown in the user interface.

Anyway, according to the previous discussion, sending a key combination to a document element in order to perform an action outside the document seems to be not intended anymore.

@whimboo
Copy link
Collaborator

whimboo commented Nov 28, 2017

We should not recommend people to disable the multi-process feature of Firefox. Keep in mind that all of the speed improvements as been made with Firefox 57 will become mood. Further this single process mode is no longer deeply tested, and several bugs could appear which then can make your tests fail.

@hheexx
Copy link

hheexx commented Nov 28, 2017

@whimboo
I don't know about bugs but for me single process is faster in number of pages opened per minute.
It may be because of lower IPC or lower memory pressure.
(My project is a crawler so it uses 10-20 browser sessions at a same time)

FF57

@whimboo
Copy link
Collaborator

whimboo commented Nov 29, 2017

@hheexx in that case it would be worth filing a bug with the performance team so that this could be investigated, and improved.

@yucer
Copy link

yucer commented Dec 4, 2017

@whimboo I was just noting that the cause could be there. If I disable that and the old behavior comes without issues, that means that it should be related.

Of course, if you disable the new main feature of the new features you are testing another browser. But for many of us the interest is to test the business work-flow of our applications. Use it for stress tests or some other resource-demanding performance tests will be expensive.

Although I guess that in this specific context many people could be trying to use the "new tabs" with that goal. Maybe opening N tabs to see how much the browser can stand. In that case you are right, they would be loosing their time because they are testing precisely what their are disabling.

In our case we test concurrency updates over the records, as long as we don't get the ultimate solution we try to get the old tests working. Unfortunately we don't have the time resources to dig more into the problem, to provide you more context. But I give you the key: multiprocess.

Maybe the problem is that the multiprocess firefox team did enhance the separations of concerns (content vs browsing context) in this new firefox rewrite. Then the standard and selenium need to evolve accordingly.

In the mean while we try to keep our workflow tests running.

@andreastt
Copy link
Contributor

Disabling multiprocessing in Firefox will not be testing the same browser that your users are using. Firefox ships with it enabled and there will in the future be features that will stop working when run in single-process mode.

@hheexx
Copy link

hheexx commented Dec 5, 2017

@whimboo I am not sure about that bug filling. Memory usage is collateral damage of multi process model. 2 processes must use more memory then 1. Also IPC has cost.

e10s is faster in perceived performance for tipical web browsing usage but in my case of 10 instances of Firefox always open and pumping pages... single process makes sense to be faster.

@whimboo
Copy link
Collaborator

whimboo commented Dec 6, 2017

I think it's not the right place to have a debate about e10s. It's driving us away from the real issue as filed here.

Given that there is nothing more to add and the issue is closed I will also close comments on this issue now.

@mozilla mozilla locked and limited conversation to collaborators Dec 6, 2017
@whimboo whimboo changed the title CONTROL Key Chords Not Working with Selenium 3.4 CONTROL Key Chords Not Working to open new tabs and windows Apr 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants