mozilla / geckodriver

WebDriver for Firefox
https://firefox-source-docs.mozilla.org/testing/geckodriver/
Mozilla Public License 2.0
7.19k stars 1.52k forks source link

Element Send Keys is broken with Firefox 53 or newer and geckodriver 0.15.0 #659

Closed danosoft77 closed 7 years ago

danosoft77 commented 7 years ago

Firefox Version

53.0 (32 bit)

Platform

Windows 10

Steps to reproduce -

I use Python with Selenium and Geckodriver 0.15 , yesterday it work all ok with Firefox 52.0.2, from today firefox update and it now 53.0 and my code do an error when i try to push a text in a input

username.send_keys("text")

it do this error :

selenium.common.exceptions.WebDriverException: Message: Expected [object Undefined] undefined to be a string

zosrothko commented 7 years ago

Hi Got the same exception with the latest Firefox Developer Edition. The same program Selenium2Example.java works fine with Firefox 52 while it fails with Firefox 54. See the attached log

Firefox_52.0.2 (32 bits).txt

Firefox_Developper_Edition_54.0a2 (2017-04-18) (64 bits).txt

Selenium2Example.java.txt

zosrothko commented 7 years ago

Does not work neither with Firefox 53

Firefox_53.0 (32 bits).txt

danosoft77 commented 7 years ago

Yes my post spoke about Firefox 53

Da: zosrothko [mailto:notifications@github.com] Inviato: giovedì 20 aprile 2017 12:32 A: mozilla/geckodriver Cc: Daniele Caprelli; Author Oggetto: Re: [mozilla/geckodriver] Probelm : selenium.common.exceptions.WebDriverException: Message: Expected [object Undefined] undefined to be a string (#659)

Does not work neither with Firefox 53

Firefox_53.0 (32 bits).txthttps://github.com/mozilla/geckodriver/files/942348/Firefox_53.0.32.bits.txt

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mozilla/geckodriver/issues/659#issuecomment-295674021, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Aag_5GXNML0hRMM0_mY7Lu5qcC8MTjmxks5rxzQUgaJpZM4NCpSG.

andreastt commented 7 years ago

I took a look at the logs attached, and the problem is that a patch was uplifted from Firefox Nightly to Firefox 53 that makes the Marionette remote control protocol only accept a text field as part of the JSON body.

We have patched geckodriver master to accept text and convert it into the expected Marionette format. Until geckoriver 0.16.0 is released, you can build geckodriver yourself from master. Note that you will require the very latest Selenium version with 0.16.0, however.

zosrothko commented 7 years ago

Could you let this issue open until we can check that it is fixed by the release of geckoriver 0.16.0?

andreastt commented 7 years ago

It has been fixed on master, which the issue tracker is tracking.

zosrothko commented 7 years ago

ok, so can you add a label 0.16.0 then?

JohnA2 commented 7 years ago

Until geckoriver 0.16.0 is released, you can build geckodriver yourself from master. Note that you will require the very latest Selenium version with 0.16.0, however.

Does the very latest Selenium version mean the latest release - 3.3.1, or should I also build it from master?

danosoft77 commented 7 years ago

Ok but where i can download the 0.16.0 , and how i can build it?

andreastt commented 7 years ago

Does the very latest Selenium version mean the latest release - 3.3.1

I think 3.3.1 should be sufficient.

Ok but where i can download the 0.16.0 , and how i can build it?

0.16.0 has not been released yet, but build instructions are in the README.

andreastt commented 7 years ago

Please note that “me too” comments are not valuable.

KPKA commented 7 years ago

When will 0.16.0 be released?

andreastt commented 7 years ago

When it is done. That’s the best estimate I can give, sorry.

jaykhimani commented 7 years ago

Similar issue on Linux (ubuntu) as well following are the logs, in case it provides some more information.

Caused by: org.openqa.selenium.InvalidArgumentException: Expected [object Undefined] undefined to be a string
Build info: version: '3.3.1', revision: '5234b325d5', time: '2017-03-10 09:10:29 +0000'
System info: host: 'SFDWSLIN01', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-72-generic', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=/tmp/rust_mozprofile.5D8N1nchgBL3, rotatable=false, timeouts={implicit=0, pageLoad=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=53.0, platformVersion=4.4.0-72-generic, moz:processID=5036, browserName=firefox, platformName=linux}]
Session ID: e48faf4b-5f89-4b5b-bdd1-a1a572eb55d4
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:133)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:99)
    at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:43)
emolinaibanez commented 7 years ago

andreastt could you point me where is the README you refer please?? Thank you!

andreastt commented 7 years ago

@emolinaibanez https://github.com/mozilla/geckodriver#building

praveenashok commented 7 years ago

Hi emolinaibanez, I tried from linux machine to build it and able to build it as below. Do git clone of master geckodriver to your local machine. go inside geckodriver folder. You need to install curl & cargo(sudo apt install curl & sudo spt install cargo). then run command "cargo build --release". wait till it finishes, then you will find the built geckodriver file under "geckodriver/target/release".

praveenashok commented 7 years ago

@andreastt I di build the master geckodriver. Now with Firefox 53 version & selenium 3.3.1 its opening up the driver, but not entering the URL at all.

1492782738189 geckodriver INFO Listening on 127.0.0.1:18190 1492782738617 geckodriver::marionette INFO Starting browser /usr/lib/firefox/firefox.sh with args ["-marionette"] 1492782744005 Marionette INFO Listening on port 46233 org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{moz:firefoxOptions={binary=Optional.empty, args=[], legacy=null, logLevel=null, prefs={}, profile=org.openqa.selenium.firefox.FirefoxProfile@24fb6a80}, firefox_profile=org.openqa.selenium.firefox.FirefoxProfile@24fb6a80}], required capabilities = Capabilities [{moz:firefoxOptions={binary=Optional.empty, args=[], legacy=null, logLevel=null, prefs={}, profile=org.openqa.selenium.firefox.FirefoxProfile@24fb6a80}, firefox_profile=org.openqa.selenium.firefox.FirefoxProfile@24fb6a80}] Build info: version: '3.3.1', revision: '5234b325d5', time: '2017-03-10 09:10:29 +0000' System info: host: 'inblrlt-praveeng', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.10.0-19-generic', java.version: '1.8.0_112' Driver info: driver.version: FirefoxDriver

andreastt commented 7 years ago

@praveenashok I can’t tell what’s wrong from that alone. Could you paste the trace-level log from geckodriver somewhere? (See the README on how to crank up the log verbosity.)

emolinaibanez commented 7 years ago

Thank you very much @andreastt @praveenashok !!

2017-04-21 16:13 GMT+02:00 Andreas Tolfsen notifications@github.com:

@praveenashok https://github.com/praveenashok I can’t tell what’s wrong from that alone. Could you paste the trace-level log from geckodriver somewhere? (See the README on how to crank up the log verbosity.)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mozilla/geckodriver/issues/659#issuecomment-296201718, or mute the thread https://github.com/notifications/unsubscribe-auth/AZ8Q2VjHGQDgfbhVOHF5fflrO3VPwU8Cks5ryLlwgaJpZM4NCpSG .

markus-hartung-avira commented 7 years ago

It seems that even with 0.16.0 based builds it does not work. Actually it is just the selenium implementation of RemoteWebElement that is still outdated I guess

https://github.com/SeleniumHQ/selenium/blob/selenium-3.4.0/java/client/src/org/openqa/selenium/remote/RemoteWebElement.java

andreastt commented 7 years ago

(Scratch what I said earlier. Selenium has a W3C codec which translates it to a {text: "foo"} object for geckodriver compatibility.)

kaarthiiik commented 7 years ago

I see the same issue with selenium 3.4.0 and gecko driver 0.16.0. Browser - Firefox 53.0

JohnA2 commented 7 years ago

@kaarthiiik Strange, selenium 3.4.0 and geckodriver 0.16.0 fixed the issue for me. I'm also using Firefox 53.0.

jaykhimani commented 7 years ago

selenium 3.4.0 and geckodriver 0.16.0 fixes issue for me as well, both on windows and Linux with FF 53

praveenashok commented 7 years ago

Yes Selenium 3.4.0 with geckodriver 0.16 with FF 53 is working awesome now.

nsantini commented 7 years ago

Selenium 3.4.0 with geckodriver 0.16 with FF 53 on latest MacOS not working, anybody managed to make it work on mac?

gnh1201 commented 7 years ago

I have the same problem!

andreastt commented 7 years ago

@gnh1201 Please read the existing comments here. This issue has been resolved by upgrading your Firefox to 53 or greater, geckodriver to 0.16.1 or greater, and Selenium to 3.4 or greater.

nsantini commented 7 years ago

As I said before, Selenium 3.4.0 with geckodriver 0.16 with FF 53 on latest MacOS not working

kaarthiiik commented 7 years ago

This issue got resolved in windows computer when i upgraded to gecko driver v0.16.1.

andreastt commented 7 years ago

@nsantini “Not working” isn’t great for helping us debug this. Can you provide a trace-level log with that exact configuration? Did you try with Nightly? Did you try 0.16.1?

guillemlc commented 7 years ago

@andreastt I am replying also on behalf of @nsantini as I found myself in a similar predicament. I am following OTTG book for TDD with Python/Django and I ran into some issues. I tried updating progressively the versions but I get to similar issues in the way.

My versions:

MacOSX 10.11.6 (15G1421) geckodriver 0.16.1 Python 3.6.1 FF version 53 selenium 3.4.1

While running the test as in here: https://github.com/hjwp/book-example/blob/chapter_philosophy_and_refactoring/functional_tests.py

I get this in the geckodriver.log:

1493572190798   geckodriver INFO    Listening on 127.0.0.1:55369
1493572191847   geckodriver::marionette INFO    Starting browser /Applications/Firefox.app/Contents/MacOS/firefox-bin with args ["-marionette"]
1493572193222   Marionette  INFO    Listening on port 55378
1493572193289   Marionette  WARN    TLS certificate errors will be ignored for this session
2017-04-30 19:09:53.610 plugin-container[29088:7043650] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x983f, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2017-04-30 19:09:53.612 plugin-container[29088:7043650] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x533b, name = 'com.apple.CFPasteboardClient'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2017-04-30 19:09:53.612 plugin-container[29088:7043650] void __CFPasteboardSetup() : Failed to allocate communication port for com.apple.CFPasteboardClient; this is likely due to sandbox restrictions
1493572194753   Marionette  INFO    New connections will no longer be accepted

In case someone is looking for the same issue

I went around this by:

from django.views.decorators.csrf import csrf_exempt

AND:

@csrf_exempt Before creating the views. https://github.com/hjwp/book-example/blob/chapter_philosophy_and_refactoring/lists/views.py


Update:

with geckodrive 0.15 I get:

E
======================================================================
ERROR: test_can_start_a_list_and_retrieve_it_later (__main__.NewVisitorTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "functional_tests.py", line 33, in test_can_start_a_list_and_retrieve_it_later
    inputbox.send_keys('Buy peacock feathers')
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 349, in send_keys
    'value': keys_to_typing(value)})
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/remote/webelement.py", line 493, in _execute
    return self._parent.execute(command, params)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in execute
    self.error_handler.check_response(response)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/selenium/webdriver/remote/errorhandler.py", line 194, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: Expected [object Undefined] undefined to be a string

Ran 1 test in 2.984s

With 0.16 I get:


F
======================================================================
FAIL: test_can_start_a_list_and_retrieve_it_later (__main__.NewVisitorTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "functional_tests.py", line 44, in test_can_start_a_list_and_retrieve_it_later
    "New to-do item did not appear in table"
AssertionError: False is not true : New to-do item did not appear in table

----------------------------------------------------------------------
Ran 1 test in 4.032s

FAILED (failures=1)

This is a failure in the test, which is meant to happen at this point in the book.

Update2: Juts to point out that I believe that then using geckidriver 0.16.1, or at least the combination that I stated in this post should fix the issue.

TapanaKumar commented 7 years ago

still i am get same issues.

org.openqa.selenium.InvalidArgumentException: Expected [object Undefined] undefined to be a string

OS:WINDOWS FF:53 SELENIUM :1.4.0 Geckodriver-v0.16.1

Kindly solve.

codingphil commented 7 years ago

For me WebElement.sendKeys() in general works again with geckodriver 0.16 and 0.16.1 with Firefox 53 on Windows. Was broken with geckodriver 0.15.

nirjharb commented 7 years ago

It doesn't work for me. FF 53, geckodriver-v0.16.1-win64, Windows 64 Bit, Selenium 3.3.1

Shows this error :

Exception in thread "main" org.openqa.selenium.InvalidArgumentException: Expected [object Undefined] undefined to be a string
Build info: version: 'unknown', revision: '5234b32', time: '2017-03-10 09:00:17 -0800'
System info: host: 'MOBILEDESK007', ip: '192.168.2.23', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\User\AppData\Local\Temp\rust_mozprofile.3Nho94swmxEo, rotatable=false, timeouts={implicit=0, pageLoad=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=53.0, platformVersion=10.0, moz:processID=1988, browserName=firefox, platformName=windows_nt}]
Session ID: 96a97856-ffe7-4ef3-b13d-d34816d81011
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
eddiemora74 commented 7 years ago

geckodriver v0.16.1 selenium 3.4.0 FF 53

This setup works for me. I had geckodriver v0.15 before and that was the culprit.

andreastt commented 7 years ago

@guillemlc @TapanaKumar @codingphil @nirjharb @eddiemora74

Neither of you have attached a trace-level geckodriver log, as you were requested to do. I can’t guess if it’s the language binding you’re using that’s failing to send the correct data structure to geckodriver, but I suspect these are all Selenium issues.

I base that statement upon the fact that we’ve seen a number of similar issues like this reported after geckodriver and Firefox changed to only accept a text field for the Element Send Keys command. geckodriver itself maintains some level of backwards compatibility with older Firefoxen, but only to the extent that it only accepts text, but emits both value and text to the Marionette server in Firefox.

This means you need the latest geckodriver (0.16.0 or greater) with Selenium 3.4 or greater (although your mileage with your choice of language binding may vary), which together will support any of the release channels of Firefox.

trojan03 commented 7 years ago

Worked for me with latest versions of geckodriver and selenium as well

zosrothko commented 7 years ago

Le 03/05/2017 à 15:14, Eduardo Mora a écrit :

geckodriver v0.16.1 selenium 3.4.0 FF 53

This setup works for me. I had geckodriver v0.15 before and that was the culprit.

Works for me too, but got an 404 Not Found by the end on GET /shutdown

1493908113471 geckodriver INFO Listening on 127.0.0.1:6734 1493908113997 geckodriver::marionette INFO Starting browser \?\C:\Program Files (x86)\Mozilla Firefox\firefox.exe with args ["-marionette"] 1493908114588 addons.manager ERROR startup failed: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIFile.create]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: resource://gre/modules/FileUtils.jsm :: FileUtils_getDir :: line 70" data: no] Stack trace: FileUtils_getDir()@resource://gre/modules/FileUtils.jsm:70 < FileUtils_getFile()@resource://gre/modules/FileUtils.jsm:42 < validateBlocklist()@resource://gre/modules/AddonManager.jsm:671 < startup()@resource://gre/modules/AddonManager.jsm:834 < startup()@resource://gre/modules/AddonManager.jsm:3129 < observe()@resource://gre/components/addonManager.js:65 JavaScript error: resource://gre/modules/AddonManager.jsm, line 1657: NS_ERROR_NOT_INITIALIZED: AddonManager is not initialized 1493908115223 Marionette DEBUG Marionette enabled via command-line flag 1493908116026 geckodriver::marionette TRACE connection attempt 0/600 1493908116462 Marionette INFO Listening on port 62172 JavaScript error: resource://gre/modules/AddonManager.jsm, line 2570: NS_ERROR_NOT_INITIALIZED: AddonManager is not initialized 1493908117127 geckodriver::marionette DEBUG Connected to Marionette on localhost:62172 1493908117135 geckodriver::marionette TRACE ← {"applicationType":"gecko","marionetteProtocol":3} 1493908117135 geckodriver::marionette TRACE → 62:[0,1,"newSession",{"capabilities":{"desiredCapabilities":{}}}] 1493908117135 Marionette DEBUG Accepted connection conn0 from 127.0.0.1:62184 1493908117137 Marionette TRACE conn0 -> [0,1,"newSession",{"capabilities":{"desiredCapabilities":{}}}] 1493908117140 Marionette CONFIG Matched capabilities: {"browserName":"firefox","browserVersion":"53.0","platformName":"windows_nt","platformVersion":"6.1","pageLoadStrategy":"normal","acceptInsecureCerts":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"rotatable":false,"specificationLevel":0,"moz:processID":8968,"moz:profile":"C:\Users\FRANCI~1\AppData\Local\Temp\rust_mozprofile.Q5X2t930zWg4","moz:accessibilityChecks":false} 1493908117159 Marionette DEBUG loaded listener.js 1493908117169 Marionette TRACE conn0 <- [1,1,null,{"sessionId":"c6cf34e8-ff96-477a-93fd-73abd07aafd9","capabilities":{"browserName":"firefox","browserVersion":"53.0","platformName":"windows_nt","platformVersion":"6.1","pageLoadStrategy":"normal","acceptInsecureCerts":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"rotatable":false,"specificationLevel":0,"moz:processID":8968,"moz:profile":"C:\Users\FRANCI~1\AppData\Local\Temp\rust_mozprofile.Q5X2t930zWg4","moz:accessibilityChecks":false}}] 1493908117169 geckodriver::marionette TRACE ← [1,1,null,{"sessionId":"c6cf34e8-ff96-477a-93fd-73abd07aafd9","capabilities":{"browserName":"firefox","browserVersion":"53.0","platformName":"windows_nt","platformVersion":"6.1","pageLoadStrategy":"normal","acceptInsecureCerts":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"rotatable":false,"specificationLevel":0,"moz:processID":8968,"moz:profile":"C:\Users\FRANCI~1\AppData\Local\Temp\rust_mozprofile.Q5X2t930zWg4","moz:accessibilityChecks":false}}] 1493908117169 webdriver::server DEBUG ← 200 OK {"value": {"sessionId":"c6cf34e8-ff96-477a-93fd-73abd07aafd9","capabilities":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"53.0","moz:accessibilityChecks":false,"moz:processID":8968,"moz:profile":"C:\Users\FRANCI~1\AppData\Local\Temp\rust_mozprofile.Q5X2t930zWg4","pageLoadStrategy":"normal","platformName":"windows_nt","platformVersion":"6.1","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}}}} mai 04, 2017 4:28:37 PM org.openqa.selenium.remote.ProtocolHandshake createSession INFOS: Detected dialect: W3C 1493908117223 webdriver::server DEBUG → POST /session/c6cf34e8-ff96-477a-93fd-73abd07aafd9/url {"url":"http://www.google.fr"} 1493908117223 geckodriver::marionette TRACE → 42:[0,2,"get",{"url":"http://www.google.fr"}] 1493908117225 Marionette TRACE conn0 -> [0,2,"get",{"url":"http://www.google.fr"}] JavaScript error: resource://gre/modules/FileUtils.jsm, line 70: NS_ERROR_ILLEGAL_VALUE: Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIFile.create] 1493908118282 Marionette TRACE conn0 <- [1,2,null,{}] 1493908118285 geckodriver::marionette TRACE ← [1,2,null,{}] 1493908118285 webdriver::server DEBUG ← 200 OK {"value": {}} 1493908118294 webdriver::server DEBUG → POST /session/c6cf34e8-ff96-477a-93fd-73abd07aafd9/element {"value":"[name='q']","using":"css selector"} 1493908118295 geckodriver::marionette TRACE → 66:[0,3,"findElement",{"using":"css selector","value":"[name='q']"}] 1493908118296 Marionette TRACE conn0 -> [0,3,"findElement",{"using":"css selector","value":"*[name='q']"}] 1493908118300 Marionette TRACE conn0 <- [1,3,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"a6abab45-d5f4-49ca-ac31-41a2f06cbcab","ELEMENT":"a6abab45-d5f4-49ca-ac31-41a2f06cbcab"}}] 1493908118300 geckodriver::marionette TRACE ← [1,3,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"a6abab45-d5f4-49ca-ac31-41a2f06cbcab","ELEMENT":"a6abab45-d5f4-49ca-ac31-41a2f06cbcab"}}] 1493908118301 webdriver::server DEBUG ← 200 OK {"value":{"element-6066-11e4-a52e-4f735466cecf":"a6abab45-d5f4-49ca-ac31-41a2f06cbcab"}} 1493908118314 webdriver::server DEBUG → POST /session/c6cf34e8-ff96-477a-93fd-73abd07aafd9/element/a6abab45-d5f4-49ca-ac31-41a2f06cbcab/value {"id":"a6abab45-d5f4-49ca-ac31-41a2f06cbcab","text":"Cheese!","value":["C","h","e","e","s","e","!"]} 1493908118316 geckodriver::marionette TRACE → 126:[0,4,"sendKeysToElement",{"id":"a6abab45-d5f4-49ca-ac31-41a2f06cbcab","text":"Cheese!","value":["C","h","e","e","s","e","!"]}] 1493908118326 Marionette TRACE conn0 -> [0,4,"sendKeysToElement",{"id":"a6abab45-d5f4-49ca-ac31-41a2f06cbcab","text":"Cheese!","value":["C","h","e","e","s","e","!"]}] 1493908118457 Marionette TRACE conn0 <- [1,4,null,{}] 1493908118465 geckodriver::marionette TRACE ← [1,4,null,{}] 1493908118465 webdriver::server DEBUG ← 200 OK {"value": {}} 1493908118493 webdriver::server DEBUG → POST /session/c6cf34e8-ff96-477a-93fd-73abd07aafd9/execute/sync {"script":"var form = arguments[0];\nwhile (form.nodeName != \"FORM\" && form.parentNode) {\n form = form.parentNode;\n}\nif (!form) { throw Error('Unable to find containing form element'); }\nif (!form.ownerDocument) { throw Error('Unable to find owning document'); }\nvar e = form.ownerDocument.createEvent('Event');\ne.initEvent('submit', true, true);\nif (form.dispatchEvent(e)) { form.submit() }\n","args":[{"element-6066-11e4-a52e-4f735466cecf":"a6abab45-d5f4-49ca-ac31-41a2f06cbcab"}]} 1493908118494 geckodriver::marionette TRACE → 577:[0,5,"executeScript",{"args":[{"element-6066-11e4-a52e-4f735466cecf":"a6abab45-d5f4-49ca-ac31-41a2f06cbcab"}],"newSandbox":false,"script":"var form = arguments[0];\nwhile (form.nodeName != \"FORM\" && form.parentNode) {\n form = form.parentNode;\n}\nif (!form) { throw Error('Unable to find containing form element'); }\nif (!form.ownerDocument) { throw Error('Unable to find owning document'); }\nvar e = form.ownerDocument.createEvent('Event');\ne.initEvent('submit', true, true);\nif (form.dispatchEvent(e)) { form.submit() }\n","scriptTimeout":null,"specialPowers":false}] 1493908118495 Marionette TRACE conn0 -> [0,5,"executeScript",{"args":[{"element-6066-11e4-a52e-4f735466cecf":"a6abab45-d5f4-49ca-ac31-41a2f06cbcab"}],"newSandbox":false,"script":"var form = arguments[0];\nwhile (form.nodeName != \"FORM\" && form.parentNode) {\n form = form.parentNode;\n}\nif (!form) { throw Error('Unable to find containing form element'); }\nif (!form.ownerDocument) { throw Error('Unable to find owning document'); }\nvar e = form.ownerDocument.createEvent('Event');\ne.initEvent('submit', true, true);\nif (form.dispatchEvent(e)) { form.submit() }\n","scriptTimeout":null,"specialPowers":false}] 1493908118546 Marionette TRACE conn0 <- [1,5,null,{"value":null}] 1493908118556 geckodriver::marionette TRACE ← [1,5,null,{"value":null}] 1493908118556 webdriver::server DEBUG ← 200 OK {"value":null} 1493908118560 webdriver::server DEBUG → GET /session/c6cf34e8-ff96-477a-93fd-73abd07aafd9/title 1493908118560 geckodriver::marionette TRACE → 19:[0,6,"getTitle",{}] 1493908118562 Marionette TRACE conn0 -> [0,6,"getTitle",{}] 1493908118566 Marionette TRACE conn0 <- [1,6,null,{"value":"Google"}] 1493908118565 geckodriver::marionette TRACE ← [1,6,null,{"value":"Google"}] 1493908118565 webdriver::server DEBUG ← 200 OK {"value":"Google"} Page title is: Google 1493908118574 webdriver::server DEBUG → GET /session/c6cf34e8-ff96-477a-93fd-73abd07aafd9/title 1493908118574 geckodriver::marionette TRACE → 19:[0,7,"getTitle",{}] 1493908118576 Marionette TRACE conn0 -> [0,7,"getTitle",{}] 1493908118578 Marionette TRACE conn0 <- [1,7,null,{"value":"Google"}] 1493908118578 geckodriver::marionette TRACE ← [1,7,null,{"value":"Google"}] 1493908118578 webdriver::server DEBUG ← 200 OK {"value":"Google"} 1493908119082 webdriver::server DEBUG → GET /session/c6cf34e8-ff96-477a-93fd-73abd07aafd9/title 1493908119082 geckodriver::marionette TRACE → 19:[0,8,"getTitle",{}] 1493908119083 Marionette TRACE conn0 -> [0,8,"getTitle",{}] 1493908119085 Marionette TRACE conn0 <- [1,8,null,{"value":"Google"}] 1493908119084 geckodriver::marionette TRACE ← [1,8,null,{"value":"Google"}] 1493908119084 webdriver::server DEBUG ← 200 OK {"value":"Google"} 1493908119587 webdriver::server DEBUG → GET /session/c6cf34e8-ff96-477a-93fd-73abd07aafd9/title 1493908119588 geckodriver::marionette TRACE → 19:[0,9,"getTitle",{}] 1493908119692 Marionette TRACE conn0 -> [0,9,"getTitle",{}] 1493908119709 Marionette TRACE conn0 <- [1,9,null,{"value":"Cheese! - Recherche Google"}] 1493908119709 geckodriver::marionette TRACE ← [1,9,null,{"value":"Cheese! - Recherche Google"}] 1493908119709 webdriver::server DEBUG ← 200 OK {"value":"Cheese! - Recherche Google"} 1493908119712 webdriver::server DEBUG → GET /session/c6cf34e8-ff96-477a-93fd-73abd07aafd9/title 1493908119712 geckodriver::marionette TRACE → 20:[0,10,"getTitle",{}] 1493908119714 Marionette TRACE conn0 -> [0,10,"getTitle",{}] 1493908119715 Marionette TRACE conn0 <- [1,10,null,{"value":"Cheese! - Recherche Google"}] 1493908119716 geckodriver::marionette TRACE ← [1,10,null,{"value":"Cheese! - Recherche Google"}] 1493908119716 webdriver::server DEBUG ← 200 OK {"value":"Cheese! - Recherche Google"} Page title is: Cheese! - Recherche Google 1493908119719 webdriver::server DEBUG → DELETE /session/c6cf34e8-ff96-477a-93fd-73abd07aafd9 1493908119719 geckodriver::marionette TRACE → 49:[0,11,"quitApplication",{"flags":["eForceQuit"]}] 1493908119725 Marionette TRACE conn0 -> [0,11,"quitApplication",{"flags":["eForceQuit"]}] 1493908119726 Marionette INFO New connections will no longer be accepted 1493908119726 Marionette TRACE conn0 <- [1,11,null,{}] 1493908119760 geckodriver::marionette TRACE ← [1,11,null,{}] 1493908119760 webdriver::server DEBUG Deleting session 1493908119760 geckodriver::marionette DEBUG Stopping browser process 1493908119891 webdriver::server DEBUG ← 200 OK {"value": {}} 1493908119908 webdriver::server DEBUG → GET /shutdown 1493908119910 webdriver::server DEBUG ← 404 Not Found {"value":{"error":"unknown command","message":"GET /shutdown did not match a known command","stacktrace":"stack backtrace:\n 0:
0x489f6f - \n 1: 0x48ad59 - \n
2: 0x43a15d - \n 3: 0x42ec0f - <no info>\n 4: 0x423c30 - \n 5: 0x4078fa -

\n 6: 0x6bc939 - \n 7: 0x415d0d - \n 8: 0x6b6e43 - \n 9: 0x775a59cd - BaseThreadInitThunk"}} > — > You are receiving this because you commented. > Reply to this email directly, view it on GitHub > , > or mute the thread > . >
andreastt commented 7 years ago

@zosrothko /shutdown is not a valid geckodriver endpoint. I suspect it is a custom endpoint Selenium has added, and I would file an issue with them.

zosrothko commented 7 years ago

OK will do it. Thanks

nirjharb commented 7 years ago

Have tested this in FF 53, geckodriver-v0.16.1-win64, Windows 64 Bit, Selenium 3.4.0 and it passed. It is WORKING now. All, appreciate your help and guidance. Thank you!

russcarter commented 7 years ago

Not working with:

I'll try to investigate the behavior from my logs, forum comments, and address it better in subsequent feedback (whether here and/or another bug).

andreastt commented 7 years ago

@russcarter This has been confirmed fixed by several users, so I suspect you haven’t updated to the latest geckodriver, Selenium, and Firefox version. Please ensure you’re using Firefox Nightly for the best experience.

If it still does not work for you, you are welcome to file a new bug, but we will need a geckodriver trace-level log attached to it.

pichai-t commented 7 years ago

Thank you everyone (especially @andreastt and @danosoft77)

This page helped me a lot. My configurations as below.

abalonperin commented 7 years ago

Working with:

@andreastt, thank you for fixing the issue.

BrandonDudek commented 7 years ago

(Moved to 786)

Still an Issue for:

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

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

Result: Nothing Happens.

Note: I can still send normal keys to an input element.

7k50 commented 7 years ago

Seem to be having same issue with:

Selenium: 3.4.3 Python 2.7.13. geckodriver: 0.17.0 Firefox: 54.0 macOS: 10.12.5

HansAarneLiblik commented 7 years ago

Are you using proxy ? If so, you have to strip the port from 'httpProxy' element and add it to 'httpProxyPort' element.

String port = proxy.getHttpProxy().substring(proxy.getHttpProxy().indexOf(":") + 1); String host = proxy.getHttpProxy().substring(0, proxy.getHttpProxy().indexOf(":")); JsonObject proxyJson = new JsonObject(); proxyJson.addProperty("proxyType", "manual"); proxyJson.addProperty("httpProxy", host); proxyJson.addProperty("httpProxyPort", Integer.valueOf(port)); capabilities.setCapability(CapabilityType.PROXY, proxyJson);

This fix solved the issue for me