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

send_keys results in Expected [object Undefined] undefined to be a string(..) in FF Nightly #647

Closed
ghost opened this issue Apr 13, 2017 · 15 comments

Comments

@ghost
Copy link

ghost commented Apr 13, 2017

Firefox Version

55.0a1 (2017-04-12) (32-bit)

Platform

Windows 10 x64

Steps to reproduce -

<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.3.1</version>
</dependency>

import java.util.logging.Level;

import org.junit.Assert;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxOptions;



public class FirefoxSendKeysTest {
	
	@Test
    public void sendKeysToInputFieldTest() {
		
		System.setProperty("webdriver.gecko.driver", "C:/gecko/geckodriver-v0.15.0-win64/geckodriver.exe");
		FirefoxOptions options = new FirefoxOptions();
		options.setLogLevel(Level.FINE);
		FirefoxDriver driver = new FirefoxDriver(options);		
        
        try {
        	
        	driver.get("https://www.google.com.au");        	
        	WebElement inputField = driver.findElement(By.name("q"));
        	
        	Assert.assertEquals("lst-ib", inputField.getAttribute("id"));
        	
        	System.out.println(inputField);
        	//inputField.clear();
        	//inputField.sendKeys("I'm entering some new text");
        	inputField.sendKeys("abc");
        	
        } finally {
            driver.quit();
        }
    }
}

logging file

1492044604124 geckodriver INFO Listening on 127.0.0.1:26314
1492044604864 mozprofile::profile INFO Using profile path C:\Users\XXXXXXX\AppData\Local\Temp\rust_mozprofile.9WbCiI6AK8vS
1492044604885 geckodriver::marionette INFO Starting browser C:\Program Files (x86)\Nightly\firefox.exe with args []
1492044604901 geckodriver::marionette INFO Connecting to Marionette on localhost:59231
1492044605711 Marionette WARN Deprecated preference marionette.defaultPrefs.enabled detected, please use marionette.enabled
1492044606912 geckodriver::marionette DEBUG connection attempt 0/600
1492044607428 Marionette DEBUG Setting recommended pref datareporting.policy.dataSubmissionPolicyAccepted to false
1492044607429 Marionette INFO Listening on port 59231
1492044608014 geckodriver::marionette DEBUG TCP connection established
1492044608017 Marionette DEBUG Accepted connection 0 from 127.0.0.1:59248
1492044608018 geckodriver::marionette DEBUG � {"applicationType":"gecko","marionetteProtocol":3}
1492044608018 geckodriver::marionette DEBUG → 105:[0,1,"newSession",{"capabilities":{"desiredCapabilities":{},"requiredCapabilities":{}},"sessionId":null}]
1492044608023 Marionette CONFIG Matched capabilities: {"browserName":"firefox","browserVersion":"55.0a1","platformName":"windows_nt","platformVersion":"10.0","pageLoadStrategy":"normal","acceptInsecureCerts":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"rotatable":false,"specificationLevel":0,"moz:processID":10384,"moz:profile":"C:\Users\XXXXXXX\AppData\Local\Temp\rust_mozprofile.9WbCiI6AK8vS","moz:accessibilityChecks":false}
1492044608084 geckodriver::marionette DEBUG � [1,1,null,{"sessionId":"82f02c80-9f02-4a8c-b792-713799f7e708","capabilities":{"browserName":"firefox","browserVersion":"55.0a1","platformName":"windows_nt","platformVersion":"10.0","pageLoadStrategy":"normal","acceptInsecureCerts":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"rotatable":false,"specificationLevel":0,"moz:processID":10384,"moz:profile":"C:\Users\XXXX\AppData\Local\Temp\rust_mozprofile.9WbCiI6AK8vS","moz:accessibilityChecks":false}}]
1492044608084 webdriver::server DEBUG Returning status Ok
1492044608084 webdriver::server DEBUG Returning body {"value": {"sessionId":"82f02c80-9f02-4a8c-b792-713799f7e708","value":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"55.0a1","moz:accessibilityChecks":false,"moz:processID":10384,"moz:profile":"C:\Users\XXXXXXXXX\AppData\Local\Temp\rust_mozprofile.9WbCiI6AK8vS","pageLoadStrategy":"normal","platformName":"windows_nt","platformVersion":"10.0","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}}}}
1492044608084 hyper::server::response DEBUG writing head: Http11 Ok
1492044608084 hyper::server::response DEBUG headers [
Headers { Connection: close
, Content-Type: application/json; charset=utf-8
, Cache-Control: no-cache
, Content-Length: 474
, Date: Thu, 13 Apr 2017 00:50:08 GMT
, }]
1492044608084 hyper::server::response DEBUG write 474 bytes
1492044608084 hyper::server DEBUG keep_alive = false for 127.0.0.1:59230
1492044608084 hyper::server DEBUG keep_alive loop ending for 127.0.0.1:59230
Apr 13, 2017 10:20:08 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
1492044611213 hyper::server DEBUG Incoming stream
1492044611214 hyper::server::request DEBUG Request Line: Post AbsolutePath("/session/82f02c80-9f02-4a8c-b792-713799f7e708/url") Http11
1492044611214 hyper::server::request DEBUG Headers { Content-Type: application/json; charset=utf-8
, Content-Length: 35
, Host: localhost:26314
, Connection: Keep-Alive
, User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_101)
, Accept-Encoding: gzip,deflate
, }
1492044611214 webdriver::server DEBUG Got request POST AbsolutePath("/session/82f02c80-9f02-4a8c-b792-713799f7e708/url")
1492044611214 webdriver::command DEBUG Got request body {"url":"https://www.google.com.au"}
1492044611216 geckodriver::marionette DEBUG → 47:[0,2,"get",{"url":"https://www.google.com.au"}]
1492044612657 geckodriver::marionette DEBUG � [1,2,null,{}]
1492044612657 webdriver::server DEBUG Returning status Ok
1492044612657 webdriver::server DEBUG Returning body {"value": {}}
1492044612657 hyper::server::response DEBUG writing head: Http11 Ok
1492044612657 hyper::server::response DEBUG headers [
Headers { Connection: close
, Content-Type: application/json; charset=utf-8
, Cache-Control: no-cache
, Content-Length: 13
, Date: Thu, 13 Apr 2017 00:50:12 GMT
, }]
1492044612657 hyper::server::response DEBUG write 13 bytes
1492044612657 hyper::server DEBUG keep_alive = false for 127.0.0.1:59249
1492044612657 hyper::server DEBUG keep_alive loop ending for 127.0.0.1:59249
1492044614118 hyper::server DEBUG Incoming stream
1492044614118 hyper::server::request DEBUG Request Line: Post AbsolutePath("/session/82f02c80-9f02-4a8c-b792-713799f7e708/element") Http11
1492044614118 hyper::server::request DEBUG Headers { Content-Type: application/json; charset=utf-8
, Content-Length: 46
, Host: localhost:26314
, Connection: Keep-Alive
, User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_101)
, Accept-Encoding: gzip,deflate
, }
1492044614118 webdriver::server DEBUG Got request POST AbsolutePath("/session/82f02c80-9f02-4a8c-b792-713799f7e708/element")
1492044614119 webdriver::command DEBUG Got request body {"value":"[name='q']","using":"css selector"}
1492044614119 geckodriver::marionette DEBUG → 66:[0,3,"findElement",{"using":"css selector","value":"
[name='q']"}]
1492044614130 geckodriver::marionette DEBUG � [1,3,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"edb9e953-f373-4631-b247-335395d66abb","ELEMENT":"edb9e953-f373-4631-b247-335395d66abb"}}]
1492044614130 webdriver::server DEBUG Returning status Ok
1492044614130 webdriver::server DEBUG Returning body {"value":{"element-6066-11e4-a52e-4f735466cecf":"edb9e953-f373-4631-b247-335395d66abb"}}
1492044614130 hyper::server::response DEBUG writing head: Http11 Ok
1492044614130 hyper::server::response DEBUG headers [
Headers { Connection: close
, Content-Type: application/json; charset=utf-8
, Cache-Control: no-cache
, Content-Length: 88
, Date: Thu, 13 Apr 2017 00:50:14 GMT
, }]
1492044614130 hyper::server::response DEBUG write 88 bytes
1492044614130 hyper::server DEBUG keep_alive = false for 127.0.0.1:59259
1492044614130 hyper::server DEBUG keep_alive loop ending for 127.0.0.1:59259
1492044616185 hyper::server DEBUG Incoming stream
1492044616185 hyper::server::request DEBUG Request Line: Post AbsolutePath("/session/82f02c80-9f02-4a8c-b792-713799f7e708/element/edb9e953-f373-4631-b247-335395d66abb/value") Http11
1492044616185 hyper::server::request DEBUG Headers { Content-Type: application/json; charset=utf-8
, Content-Length: 67
, Host: localhost:26314
, Connection: Keep-Alive
, User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_101)
, Accept-Encoding: gzip,deflate
, }
1492044616185 webdriver::server DEBUG Got request POST AbsolutePath("/session/82f02c80-9f02-4a8c-b792-713799f7e708/element/edb9e953-f373-4631-b247-335395d66abb/value")
1492044616187 webdriver::command DEBUG Got request body {"id":"edb9e953-f373-4631-b247-335395d66abb","value":["a","b","c"]}
1492044616200 geckodriver::marionette DEBUG → 93:[0,4,"sendKeysToElement",{"id":"edb9e953-f373-4631-b247-335395d66abb","value":["a","b","c"]}]
1492044616209 geckodriver::marionette DEBUG � [1,4,{"error":"invalid argument","message":"Expected [object Undefined] undefined to be a string","stacktrace":"WebDriverError@chrome://marionette/content/error.js:211:5\nInvalidArgumentError@chrome://marionette/content/error.js:301:5\nassert.that/<@chrome://marionette/content/assert.js:368:13\nassert.string@chrome://marionette/content/assert.js:278:10\nGeckoDriver.prototype.sendKeysToElement@chrome://marionette/content/driver.js:2146:3\nTaskImpl_run@resource://gre/modules/Task.jsm:319:42\nTaskImpl@resource://gre/modules/Task.jsm:277:3\nasyncFunction@resource://gre/modules/Task.jsm:252:14\nTask_spawn@resource://gre/modules/Task.jsm:166:12\nTaskImpl_handleResultValue@resource://gre/modules/Task.jsm:389:16\nTaskImpl_run@resource://gre/modules/Task.jsm:327:15\nTaskImpl@resource://gre/modules/Task.jsm:277:3\nasyncFunction@resource://gre/modules/Task.jsm:252:14\nTask_spawn@resource://gre/modules/Task.jsm:166:12\nexecute@chrome://marionette/content/server.js:500:15\nonPacket@chrome://marionette/content/server.js:471:7\n_onJSONObjectReady/<@chrome://marionette/content/server.js -> resource://devtools/shared/transport/transport.js:483:11\nexports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14\nexports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14\n"},null]
1492044616210 webdriver::server DEBUG Returning status BadRequest
1492044616210 webdriver::server DEBUG Returning body {"value":{"error":"invalid argument","message":"Expected [object Undefined] undefined to be a string","stacktrace":"stack backtrace:\n 0: 0x61f07f - \n 1: 0x61fe59 - \n 2: 0x43b0b5 - \n 3: 0x420313 - \n 4: 0x408307 - \n 5: 0x6750f9 - \n 6: 0x416877 - \n 7: 0x66ed53 - \n 8: 0x7ffb10518102 - BaseThreadInitThunk"}}
1492044616210 hyper::server::response DEBUG writing head: Http11 BadRequest
1492044616210 hyper::server::response DEBUG headers [
Headers { Connection: close
, Content-Type: application/json; charset=utf-8
, Cache-Control: no-cache
, Content-Length: 487
, Date: Thu, 13 Apr 2017 00:50:16 GMT
, }]
1492044616210 hyper::server::response DEBUG write 487 bytes
1492044616210 hyper::server DEBUG keep_alive = false for 127.0.0.1:59260
1492044616210 hyper::server DEBUG keep_alive loop ending for 127.0.0.1:59260
1492044618672 hyper::server DEBUG Incoming stream
1492044618672 hyper::server::request DEBUG Request Line: Delete AbsolutePath("/session/82f02c80-9f02-4a8c-b792-713799f7e708") Http11
1492044618672 hyper::server::request DEBUG Headers { Host: localhost:26314
, Connection: Keep-Alive
, User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_101)
, Accept-Encoding: gzip,deflate
, }
1492044618672 webdriver::server DEBUG Got request DELETE AbsolutePath("/session/82f02c80-9f02-4a8c-b792-713799f7e708")
1492044618673 geckodriver::marionette DEBUG → 48:[0,5,"quitApplication",{"flags":["eForceQuit"]}]
1492044618676 Marionette INFO New connections will no longer be accepted
1492044618815 geckodriver::marionette DEBUG � [1,5,null,{"cause":"shutdown"}]
1492044618815 webdriver::server DEBUG Deleting session
1492044618815 geckodriver::marionette DEBUG Stopping browser process
1492044618890 webdriver::server DEBUG Returning status Ok
1492044618890 webdriver::server DEBUG Returning body {"value": {}}
1492044618890 hyper::server::response DEBUG writing head: Http11 Ok
1492044618890 hyper::server::response DEBUG headers [
Headers { Connection: close
, Content-Type: application/json; charset=utf-8
, Cache-Control: no-cache
, Content-Length: 13
, Date: Thu, 13 Apr 2017 00:50:18 GMT
, }]
1492044618890 hyper::server::response DEBUG write 13 bytes
1492044618890 hyper::server DEBUG keep_alive = false for 127.0.0.1:59261
1492044618890 hyper::server DEBUG keep_alive loop ending for 127.0.0.1:59261
1492044618908 hyper::server DEBUG Incoming stream
1492044618912 hyper::server::request DEBUG Request Line: Get AbsolutePath("/shutdown") Http11
1492044618912 hyper::server::request DEBUG Headers { User-Agent: Java/1.8.0_101
, Host: localhost:26314
, Accept: text/html, image/gif, image/jpeg, *; q=.2, /; q=.2
, Connection: keep-alive
, }
1492044618912 webdriver::server DEBUG Got request GET AbsolutePath("/shutdown")
1492044618914 webdriver::server DEBUG Returning status NotFound
1492044618914 webdriver::server DEBUG Returning body {"value":{"error":"unknown command","message":"GET /shutdown did not match a known command","stacktrace":"stack backtrace:\n 0: 0x61f07f - \n 1: 0x61fe59 - \n 2: 0x42cac9 - \n 3: 0x4091cc - \n 4: 0x6750f9 - \n 5: 0x416b5b - \n 6: 0x66ed53 - \n 7: 0x7ffb10518102 - BaseThreadInitThunk"}}
1492044618914 hyper::server::response DEBUG writing head: Http11 NotFound
1492044618914 hyper::server::response DEBUG headers [
Headers { Connection: close
, Content-Type: application/json; charset=utf-8
, Cache-Control: no-cache
, Content-Length: 439
, Date: Thu, 13 Apr 2017 00:50:18 GMT
, }]
1492044618914 hyper::server::response DEBUG write 439 bytes
1492044618914 hyper::server DEBUG keep_alive = false for 127.0.0.1:59262
1492044618914 hyper::server DEBUG keep_alive loop ending for 127.0.0.1:59262

@ghost
Copy link
Author

ghost commented Apr 13, 2017

@lutostag
Copy link

I believe that might be what is causing: https://travis-ci.org/lutostag/webextension-formsave/builds/222489657#L530 as well.

Confirmed to pass on ffx 52, failing on dev & nightly.

@andreastt
Copy link
Contributor

You will probably have to use the latest HEAD of geckodriver’s master branch until 0.16.0 is released for sending keys to work.

@shogowada
Copy link

@andreastt

I see 0.16.0 is 100% complete but not released yet. Can you tell me when we can expect the version to be released?

Also, is the HEAD version available for download so that travis can use it meanwhile?

@andreastt
Copy link
Contributor

0.16.0 will be out when is it out, but you can find build instructions in the README on how to build it yourself.

@andreastt
Copy link
Contributor

For the record, I believe this is a duplicate of #659.

jirkadanek pushed a commit to jirkadanek/dispatch-console-tests that referenced this issue Apr 21, 2017
@jirkadanek
Copy link

0.16.0 was released few hours ago. there was much rejoicing

jirkadanek pushed a commit to rh-messaging-qe/travisci that referenced this issue Apr 21, 2017
@andreastt
Copy link
Contributor

@jdanekrh Thank you so much for confirming!

@phillipp
Copy link

Is this supposed to be fixed in geckodriver v17? because for me, it isn't...?

@andreastt
Copy link
Contributor

@phillipp It was fixed in 0.16.0, which is two releases ago.

@kicohen
Copy link

kicohen commented Jun 16, 2017

I'm having the same issue with v0.16.1

@akgargo
Copy link

akgargo commented Jun 16, 2017

I have the same problem with the lastest geckodriver 0.17.0

@kicohen
Copy link

kicohen commented Jun 16, 2017

I think it might be an issue with the version of Selenium needs to match the version of GeckoDriver.

Selenium 3.3.0 didn't work with Gecko 0.16.1 but Selenium 3.4.0 works with Gecko 0.16.1. I know that Selenium 3.3.0 did not work with Gecko 0.17.0

@mozilla mozilla deleted a comment from akgargo Jun 29, 2017
@mozilla mozilla deleted a comment from Bharadwaj108 Jun 29, 2017
@mozilla mozilla deleted a comment from junshoong Jun 29, 2017
@mozilla mozilla deleted a comment from akgargo Jun 29, 2017
@mozilla mozilla deleted a comment from akgargo Jun 29, 2017
@Ravi-ratnakaram
Copy link

Ravi-ratnakaram commented Jul 18, 2017

I am still seeing the same issue with Gecko driver version v16.0 and selenium 3.4.0 . Can someone confirm whether this issue fixed or not?

emanuele45 added a commit to emanuele45/Dialogo that referenced this issue Jul 29, 2017
emanuele45 added a commit to emanuele45/Dialogo that referenced this issue Jul 29, 2017
emanuele45 added a commit to emanuele45/Dialogo that referenced this issue Jul 29, 2017
@lock
Copy link

lock bot commented Aug 17, 2019

This issue has been automatically locked since there has not been any recent activity after it was closed. If you have run into an issue you think is related, please open a new issue.

@lock lock bot locked and limited conversation to collaborators Aug 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants