SendKeys not working in Firefox with Selenium 3.3.1 and GeckoDriver 0.15.0

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

SendKeys not working in Firefox with Selenium 3.3.1 and GeckoDriver 0.15.0

Selenium - Users mailing list
Selenium Version: 3.3.1
Geckodriver version: 0.15.0
Firefox version: Nightly (55.0.a1)

I updated Selenium yesterday to 3.3.1 and took the latest GeckoDriver 0.15.0. As a preface, everything works fine in Chrome and I didn't have to change any existing code.

When I try to run a test using Firefox, it successfully launches the browser and is able to click elements (buttons, the field I'm trying to input text into, etc) and navigate through the program. But I cannot figure out a way to get text entered into the field. I have put breakpoints and checked that Selenium can get the element, it's displayed, it's enabled, and everything comes back fine. I have even put some text into the field and verified that Selenium sees that text and it does. I am able to run just fine using Selenium 2.53 and an older version of the browser but we need to get Selenium 3 implemented. I have spent a couple of days googling the problems I'm running into and I'm not getting anywhere with this.

The error I receive when trying to enter text is this:

WARNING: Exception thrown
org.openqa.selenium.InvalidArgumentException: Expected [object Undefined] undefined to be a string
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'ADMINIB-8F07IP5', ip: '9.76.42.45', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\IBM_AD~1\AppData\Local\Temp\rust_mozprofile.oHMoJtANs1zD, rotatable=false, timeouts={implicit=0, pageLoad=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=55.0a1, platformVersion=6.1, moz:processID=12100, browserName=firefox, platformName=windows_nt}]
Session ID: 9b3f7bb1-48ae-4e36-afdd-12b1c4e7f7ef
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:88)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
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)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:274)
at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:495)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement$1.invoke(EventFiringWebDriver.java:332)
at com.sun.proxy.$Proxy15.sendKeys(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.sendKeys(EventFiringWebDriver.java:355)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:495)
at org.openqa.selenium.remote.server.KnownElements$1.invoke(KnownElements.java:64)
at com.sun.proxy.$Proxy16.sendKeys(Unknown Source)
at org.openqa.selenium.remote.server.handler.SendKeys.call(SendKeys.java:50)
at org.openqa.selenium.remote.server.handler.SendKeys.call(SendKeys.java:29)
at java.util.concurrent.FutureTask.run(FutureTask.java:277)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:785)

Has anyone had any experience with this? Unfortunately I'm unable to provide a link to test against as it's inside my company intranet.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/ef1f93ed-edab-45b4-a8a3-913358576bde%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SendKeys not working in Firefox with Selenium 3.3.1 and GeckoDriver 0.15.0

Dollar Strike
There're few issues in geckodriver. I have faced issue with Geckodriver while clicking an element. I can just give alternatives.
1. Did you try using System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE,"false"); or using Firefox options setting up the capabilities. 
2. Try using JavascriptExecutor to set value
3. Copy the string to the clipboard (java.awt) paste it in the Text box

Downgrade the version.

Let us know if you find any other solution which worked

Regards
Charan - Security Analyst | Test Automation Engineer | Blogger
https://seleniumbycharan.wordpress.com

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/0870a806-fd27-4b0d-a1d6-bde1f50e3535%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SendKeys not working in Firefox with Selenium 3.3.1 and GeckoDriver 0.15.0

Andreas Tolfsen
In reply to this post by Selenium - Users mailing list
Also sprach 'kfauto13' via Selenium Users <selenium-
[hidden email]>:

> Selenium Version: 3.3.1
> Geckodriver version: 0.15.0
> Firefox version: Nightly (55.0.a1)
>
> I updated Selenium yesterday to 3.3.1 and took the latest
> GeckoDriver 0.15.0. As a preface, everything works fine in Chrome
> and I didn't have to change any existing code.
>
> When I try to run a test using Firefox, it successfully launches
> the browser and is able to click elements (buttons, the field I'm
> trying to input text into, etc) and navigate through the program.
> But I cannot figure out a way to get text entered into the field.

From your stacktrace it looks like Selenium is sending the wrong
JSON body to geckodriver.  geckodriver expects

        {text: "string"}

whereas RemoteWebElement.java in Selenium sends

        {value: ["s", "t", "r", "i", "n", "g"]}

I would file a bug with Selenium.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1490966133.29882.7.camel%40mozilla.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SendKeys not working in Firefox with Selenium 3.3.1 and GeckoDriver 0.15.0

Selenium - Users mailing list
In reply to this post by Dollar Strike
1. Yes, it didn't seem to make any difference what properties I changed or set.
2. I don't really want to do this. The same code is working for me on Chrome and IE, and it used to work just fine in Selenium 2 (2.53.1).
3. This could be an option, but I already know of places in our applications that this doesn't work correctly.

Thanks for the suggestions! It looks to me like there's a problem in the geckodriver or in selenium's handling of the geckodriver.

On Friday, March 31, 2017 at 8:01:12 AM UTC-4, Dollar Strike wrote:
There're few issues in geckodriver. I have faced issue with Geckodriver while clicking an element. I can just give alternatives.
1. Did you try using System.setProperty(FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE,"false"); or using Firefox options setting up the capabilities. 
2. Try using JavascriptExecutor to set value
3. Copy the string to the clipboard (java.awt) paste it in the Text box

Downgrade the version.

Let us know if you find any other solution which worked

Regards
Charan - Security Analyst | Test Automation Engineer | Blogger
<a href="https://seleniumbycharan.wordpress.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fseleniumbycharan.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHu20wGKWvgCZp2wvwz6-hNxFuFaQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fseleniumbycharan.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHu20wGKWvgCZp2wvwz6-hNxFuFaQ&#39;;return true;">https://seleniumbycharan.wordpress.com
<a href="https://telluriumbycharan.wordpress.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftelluriumbycharan.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGh6PPVZHIzrhNsQb0hvO-bQ8FETA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftelluriumbycharan.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGh6PPVZHIzrhNsQb0hvO-bQ8FETA&#39;;return true;">https://telluriumbycharan.wordpress.com

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/c540640e-df79-4cc3-91fe-1491507f2014%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SendKeys not working in Firefox with Selenium 3.3.1 and GeckoDriver 0.15.0

Selenium - Users mailing list
In reply to this post by Andreas Tolfsen
I think you're right! I actually just looked at the commits since release to geckodriver and it looks like this problem may be fixed in the next release. I see this in there: 
marionette: make Send Keys and Send Alert Text accept a string
I'll keep my fingers crossed.

Thanks for your help, I appreciate it!

On Friday, March 31, 2017 at 9:16:16 AM UTC-4, Andreas Tolfsen wrote:
Also sprach 'kfauto13' via Selenium Users <selenium-
<a href="javascript:" target="_blank" gdf-obfuscated-mailto="zsd3QaU-CQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">us...@...>:

> Selenium Version: 3.3.1
> Geckodriver version: 0.15.0
> Firefox version: Nightly (55.0.a1)
>
> I updated Selenium yesterday to 3.3.1 and took the latest
> GeckoDriver 0.15.0. As a preface, everything works fine in Chrome
> and I didn't have to change any existing code.
>
> When I try to run a test using Firefox, it successfully launches
> the browser and is able to click elements (buttons, the field I'm
> trying to input text into, etc) and navigate through the program.
> But I cannot figure out a way to get text entered into the field.

From your stacktrace it looks like Selenium is sending the wrong
JSON body to geckodriver.  geckodriver expects

        {text: "string"}

whereas RemoteWebElement.java in Selenium sends

        {value: ["s", "t", "r", "i", "n", "g"]}

I would file a bug with Selenium.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/108d51fe-d783-4553-b035-45e621d072ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SendKeys not working in Firefox with Selenium 3.3.1 and GeckoDriver 0.15.0

messageselenium
In reply to this post by Selenium - Users mailing list
If send keys method is not working try using the following script 

    WebElement w1 = driver.findElement(By.xpath("//input[@id='lst-ib']"));
        
        myExecutor.executeScript("arguments[0].value='Steve';",w1);


Thanks 
Steve 

On Friday, March 31, 2017 at 12:18:11 AM UTC-4, kfauto13 wrote:
Selenium Version: 3.3.1
Geckodriver version: 0.15.0
Firefox version: Nightly (55.0.a1)

I updated Selenium yesterday to 3.3.1 and took the latest GeckoDriver 0.15.0. As a preface, everything works fine in Chrome and I didn't have to change any existing code.

When I try to run a test using Firefox, it successfully launches the browser and is able to click elements (buttons, the field I'm trying to input text into, etc) and navigate through the program. But I cannot figure out a way to get text entered into the field. I have put breakpoints and checked that Selenium can get the element, it's displayed, it's enabled, and everything comes back fine. I have even put some text into the field and verified that Selenium sees that text and it does. I am able to run just fine using Selenium 2.53 and an older version of the browser but we need to get Selenium 3 implemented. I have spent a couple of days googling the problems I'm running into and I'm not getting anywhere with this.

The error I receive when trying to enter text is this:

WARNING: Exception thrown
org.openqa.selenium.InvalidArgumentException: Expected [object Undefined] undefined to be a string
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'ADMINIB-8F07IP5', ip: '9.76.42.45', <a href="http://os.name" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fos.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBq5pahnbxzpNVLfaFeTDcQCtrYg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fos.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBq5pahnbxzpNVLfaFeTDcQCtrYg&#39;;return true;">os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\IBM_AD~1\AppData\Local\Temp\rust_mozprofile.oHMoJtANs1zD, rotatable=false, timeouts={implicit=0, pageLoad=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=55.0a1, platformVersion=6.1, moz:processID=12100, browserName=firefox, platformName=windows_nt}]
Session ID: 9b3f7bb1-48ae-4e36-afdd-12b1c4e7f7ef
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:88)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
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)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:274)
at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:495)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement$1.invoke(EventFiringWebDriver.java:332)
at com.sun.proxy.$Proxy15.sendKeys(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.sendKeys(EventFiringWebDriver.java:355)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:495)
at org.openqa.selenium.remote.server.KnownElements$1.invoke(KnownElements.java:64)
at com.sun.proxy.$Proxy16.sendKeys(Unknown Source)
at org.openqa.selenium.remote.server.handler.SendKeys.call(SendKeys.java:50)
at org.openqa.selenium.remote.server.handler.SendKeys.call(SendKeys.java:29)
at java.util.concurrent.FutureTask.run(FutureTask.java:277)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:785)

Has anyone had any experience with this? Unfortunately I'm unable to provide a link to test against as it's inside my company intranet.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/3edac5fa-7648-4f9c-8e40-0d094e556051%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SendKeys not working in Firefox with Selenium 3.3.1 and GeckoDriver 0.15.0

Anish Pillai
Hi,

I have not tried Firefox Nightly (55.0.a1), but I have been using Selenium 3.3.1, GeckoDriver 0.15.0 and Firefox 52.0.1 and I'm not getting this issue with SendKeys.


Cheers,
Anish
AutomationTestingHub

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/696e9499-84fc-4e05-bc79-6968c681a084%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SendKeys not working in Firefox with Selenium 3.3.1 and GeckoDriver 0.15.0

Selenium - Users mailing list
Really? I didn't change any code when updating from Selenium 2 to 3 and everything works fine in Chrome (I still need to try IE), but I can't get Firefox to work due to the sendKeys problem. I tried both Nightly and using Firefox 52 and the same problem occurred in both. 

Are there any settings (set system property, capability, firefoxOption, etc) that you're using with GeckoDriver? It seems that no matter what I set I run into the same problem.

On Monday, April 3, 2017 at 9:36:31 PM UTC-4, Anish Pillai wrote:
Hi,

I have not tried Firefox Nightly (55.0.a1), but I have been using Selenium 3.3.1, GeckoDriver 0.15.0 and Firefox 52.0.1 and I'm not getting this issue with SendKeys.


Cheers,
Anish
<a href="http://www.automationtestinghub.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.automationtestinghub.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG-ZM19qb2UunD2kUmYfqQx2uhG0g&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.automationtestinghub.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNG-ZM19qb2UunD2kUmYfqQx2uhG0g&#39;;return true;">AutomationTestingHub

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/7f837f4e-5fe1-4200-878f-df28585955f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SendKeys not working in Firefox with Selenium 3.3.1 and GeckoDriver 0.15.0

Prakash F
In reply to this post by Selenium - Users mailing list



Is there any related changes in key events in recent Selnium 3.3.1 and GeckoDriver v0.15.0 ?

I use Actions & Key events for Keyboard shortcuts like undo/redo/delete

           actions.keyDown(command).sendKeys("z").keyUp(command).perform();



It works fine in Chrome but not in firefox.

Is there any workarounds or else should I wait for next update ?

Thanks.



On Friday, March 31, 2017 at 9:48:11 AM UTC+5:30, kfauto13 wrote:
Selenium Version: 3.3.1
Geckodriver version: 0.15.0
Firefox version: Nightly (55.0.a1)

I updated Selenium yesterday to 3.3.1 and took the latest GeckoDriver 0.15.0. As a preface, everything works fine in Chrome and I didn't have to change any existing code.

When I try to run a test using Firefox, it successfully launches the browser and is able to click elements (buttons, the field I'm trying to input text into, etc) and navigate through the program. But I cannot figure out a way to get text entered into the field. I have put breakpoints and checked that Selenium can get the element, it's displayed, it's enabled, and everything comes back fine. I have even put some text into the field and verified that Selenium sees that text and it does. I am able to run just fine using Selenium 2.53 and an older version of the browser but we need to get Selenium 3 implemented. I have spent a couple of days googling the problems I'm running into and I'm not getting anywhere with this.

The error I receive when trying to enter text is this:

WARNING: Exception thrown
org.openqa.selenium.InvalidArgumentException: Expected [object Undefined] undefined to be a string
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'ADMINIB-8F07IP5', ip: '9.76.42.45', <a href="http://os.name" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fos.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBq5pahnbxzpNVLfaFeTDcQCtrYg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fos.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBq5pahnbxzpNVLfaFeTDcQCtrYg&#39;;return true;">os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\IBM_AD~1\AppData\Local\Temp\rust_mozprofile.oHMoJtANs1zD, rotatable=false, timeouts={implicit=0, pageLoad=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=55.0a1, platformVersion=6.1, moz:processID=12100, browserName=firefox, platformName=windows_nt}]
Session ID: 9b3f7bb1-48ae-4e36-afdd-12b1c4e7f7ef
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:88)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
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)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:274)
at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:495)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement$1.invoke(EventFiringWebDriver.java:332)
at com.sun.proxy.$Proxy15.sendKeys(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.sendKeys(EventFiringWebDriver.java:355)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:495)
at org.openqa.selenium.remote.server.KnownElements$1.invoke(KnownElements.java:64)
at com.sun.proxy.$Proxy16.sendKeys(Unknown Source)
at org.openqa.selenium.remote.server.handler.SendKeys.call(SendKeys.java:50)
at org.openqa.selenium.remote.server.handler.SendKeys.call(SendKeys.java:29)
at java.util.concurrent.FutureTask.run(FutureTask.java:277)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:785)

Has anyone had any experience with this? Unfortunately I'm unable to provide a link to test against as it's inside my company intranet.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/a77c09e1-ee4b-432e-809d-5328d86f693e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SendKeys not working in Firefox with Selenium 3.3.1 and GeckoDriver 0.15.0

Manzoor Ahmad
its issue with the latest firefox53 versio. Try using firefox52, for me it works fine

On Wednesday, April 5, 2017 at 12:19:03 PM UTC+5:30, Prakash F wrote:



Is there any related changes in key events in recent Selnium 3.3.1 and GeckoDriver v0.15.0 ?

I use Actions & Key events for Keyboard shortcuts like undo/redo/delete

           actions.keyDown(command).sendKeys("z").keyUp(command).perform();



It works fine in Chrome but not in firefox.

Is there any workarounds or else should I wait for next update ?

Thanks.



On Friday, March 31, 2017 at 9:48:11 AM UTC+5:30, kfauto13 wrote:
Selenium Version: 3.3.1
Geckodriver version: 0.15.0
Firefox version: Nightly (55.0.a1)

I updated Selenium yesterday to 3.3.1 and took the latest GeckoDriver 0.15.0. As a preface, everything works fine in Chrome and I didn't have to change any existing code.

When I try to run a test using Firefox, it successfully launches the browser and is able to click elements (buttons, the field I'm trying to input text into, etc) and navigate through the program. But I cannot figure out a way to get text entered into the field. I have put breakpoints and checked that Selenium can get the element, it's displayed, it's enabled, and everything comes back fine. I have even put some text into the field and verified that Selenium sees that text and it does. I am able to run just fine using Selenium 2.53 and an older version of the browser but we need to get Selenium 3 implemented. I have spent a couple of days googling the problems I'm running into and I'm not getting anywhere with this.

The error I receive when trying to enter text is this:

WARNING: Exception thrown
org.openqa.selenium.InvalidArgumentException: Expected [object Undefined] undefined to be a string
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'ADMINIB-8F07IP5', ip: '9.76.42.45', <a href="http://os.name" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fos.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBq5pahnbxzpNVLfaFeTDcQCtrYg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fos.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBq5pahnbxzpNVLfaFeTDcQCtrYg&#39;;return true;">os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\IBM_AD~1\AppData\Local\Temp\rust_mozprofile.oHMoJtANs1zD, rotatable=false, timeouts={implicit=0, pageLoad=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=55.0a1, platformVersion=6.1, moz:processID=12100, browserName=firefox, platformName=windows_nt}]
Session ID: 9b3f7bb1-48ae-4e36-afdd-12b1c4e7f7ef
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:88)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
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)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:274)
at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:495)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement$1.invoke(EventFiringWebDriver.java:332)
at com.sun.proxy.$Proxy15.sendKeys(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.sendKeys(EventFiringWebDriver.java:355)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:495)
at org.openqa.selenium.remote.server.KnownElements$1.invoke(KnownElements.java:64)
at com.sun.proxy.$Proxy16.sendKeys(Unknown Source)
at org.openqa.selenium.remote.server.handler.SendKeys.call(SendKeys.java:50)
at org.openqa.selenium.remote.server.handler.SendKeys.call(SendKeys.java:29)
at java.util.concurrent.FutureTask.run(FutureTask.java:277)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:785)

Has anyone had any experience with this? Unfortunately I'm unable to provide a link to test against as it's inside my company intranet.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/991774d8-e955-4ffa-992e-fc7ba819d7a2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SendKeys not working in Firefox with Selenium 3.3.1 and GeckoDriver 0.15.0

Veith Zäch
In reply to this post by Selenium - Users mailing list
Same problem with firefox on a mac

if you POST on firefox

POST localhost:4444/wd/hub/session/ac9fde47-263f-4367-bbf0-b80a9bbbe741/keys
BODY {"value":["a"]}

you get 500 error with following Body:

{
  "state": "unknown command",
  "sessionId": "ac9fde47-263f-4367-bbf0-b80a9bbbe741",
  "hCode": 2103662491,
  "value": {
    "additionalInformation": "\nDriver info: driver.version: RemoteWebDriver",
    "localizedMessage": "sendKeysToActiveElement\nBuild info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'\nSystem info: host: 'z-industries.local', ip: '192.168.10.112', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.5', java.version: '1.8.0_102'\nDriver info: driver.version: RemoteWebDriver",
    "systemInformation": "System info: host: 'z-industries.local', ip: '192.168.10.112', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.5', java.version: '1.8.0_102'",
    "supportUrl": null,
    "cause": null,
    "stackTrace": [
      {
        "fileName": "AbstractHttpCommandCodec.java",
        "nativeMethod": false,
        "methodName": "encode",
        "className": "org.openqa.selenium.remote.http.AbstractHttpCommandCodec",
        "hCode": -1245155714,
        "lineNumber": 220,
        "class": "java.lang.StackTraceElement"
      },
      {
        "fileName": "AbstractHttpCommandCodec.java",
        "nativeMethod": false,
        "methodName": "encode",
        "className": "org.openqa.selenium.remote.http.AbstractHttpCommandCodec",
        "hCode": -1245155816,
        "lineNumber": 118,
        "class": "java.lang.StackTraceElement"
      },
      {
        "fileName": "HttpCommandExecutor.java",
        "nativeMethod": false,
        "methodName": "execute",
        "className": "org.openqa.selenium.remote.HttpCommandExecutor",
        "hCode": -1852790172,
        "lineNumber": 157,
        "class": "java.lang.StackTraceElement"
      },
      {
        "fileName": "DriverCommandExecutor.java",
        "nativeMethod": false,
        "methodName": "execute",
        "className": "org.openqa.selenium.remote.service.DriverCommandExecutor",
        "hCode": -633333582,
        "lineNumber": 82,
        "class": "java.lang.StackTraceElement"
      },
      {
        "fileName": "RemoteWebDriver.java",
        "nativeMethod": false,
        "methodName": "execute",
        "className": "org.openqa.selenium.remote.RemoteWebDriver",
        "hCode": 1767885091,
        "lineNumber": 604,
        "class": "java.lang.StackTraceElement"
      },
      {
        "fileName": "RemoteExecuteMethod.java",
        "nativeMethod": false,
        "methodName": "execute",
        "className": "org.openqa.selenium.remote.RemoteExecuteMethod",
        "hCode": 524917802,
        "lineNumber": 35,
        "class": "java.lang.StackTraceElement"
      },
      {
        "fileName": "RemoteKeyboard.java",
        "nativeMethod": false,
        "methodName": "sendKeys",
        "className": "org.openqa.selenium.remote.RemoteKeyboard",
        "hCode": -2100038099,
        "lineNumber": 35,
        "class": "java.lang.StackTraceElement"
      },
      {
        "fileName": "EventFiringKeyboard.java",
        "nativeMethod": false,
        "methodName": "sendKeys",
        "className": "org.openqa.selenium.support.events.internal.EventFiringKeyboard",
        "hCode": -833178825,
        "lineNumber": 42,
        "class": "java.lang.StackTraceElement"
      },
      {
        "fileName": "SendKeyToActiveElement.java",
        "nativeMethod": false,
        "methodName": "call",
        "className": "org.openqa.selenium.remote.server.handler.interactions.SendKeyToActiveElement",
        "hCode": -1406393082,
        "lineNumber": 56,
        "class": "java.lang.StackTraceElement"
      },
      {
        "fileName": "SendKeyToActiveElement.java",
        "nativeMethod": false,
        "methodName": "call",
        "className": "org.openqa.selenium.remote.server.handler.interactions.SendKeyToActiveElement",
        "hCode": -1406393107,
        "lineNumber": 31,
        "class": "java.lang.StackTraceElement"
      },
      {
        "fileName": "FutureTask.java",
        "nativeMethod": false,
        "methodName": "run",
        "className": "java.util.concurrent.FutureTask",
        "hCode": -820313554,
        "lineNumber": 266,
        "class": "java.lang.StackTraceElement"
      },
      {
        "fileName": "DefaultSession.java",
        "nativeMethod": false,
        "methodName": "run",
        "className": "org.openqa.selenium.remote.server.DefaultSession$1",
        "hCode": -255143467,
        "lineNumber": 176,
        "class": "java.lang.StackTraceElement"
      },
      {
        "fileName": "ThreadPoolExecutor.java",
        "nativeMethod": false,
        "methodName": "runWorker",
        "className": "java.util.concurrent.ThreadPoolExecutor",
        "hCode": -1285150184,
        "lineNumber": 1142,
        "class": "java.lang.StackTraceElement"
      },
      {
        "fileName": "ThreadPoolExecutor.java",
        "nativeMethod": false,
        "methodName": "run",
        "className": "java.util.concurrent.ThreadPoolExecutor$Worker",
        "hCode": -242190645,
        "lineNumber": 617,
        "class": "java.lang.StackTraceElement"
      },
      {
        "fileName": "Thread.java",
        "nativeMethod": false,
        "methodName": "run",
        "className": "java.lang.Thread",
        "hCode": -82946320,
        "lineNumber": 745,
        "class": "java.lang.StackTraceElement"
      }
    ],
    "suppressed": [],
    "message": "sendKeysToActiveElement\nBuild info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'\nSystem info: host: 'z-industries.local', ip: '192.168.10.112', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.5', java.version: '1.8.0_102'\nDriver info: driver.version: RemoteWebDriver",
    "hCode": 1522182515,
    "class": "org.openqa.selenium.UnsupportedCommandException",
    "buildInformation": {
      "buildRevision": "5234b32",
      "buildTime": "2017-03-10 09:04:52 -0800",
      "releaseLabel": "3.3.1",
      "hCode": 1563919520,
      "class": "org.openqa.selenium.internal.BuildInfo"
    },
    "screen": null
  },
  "class": "org.openqa.selenium.remote.Response",
  "status": 9
}

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/e3e84b8a-3d69-40c6-a7a0-3ee83aa96b7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SendKeys not working in Firefox with Selenium 3.3.1 and GeckoDriver 0.15.0

Veith Zäch
I seems that firefox behaves correctly (according to the specs https://w3c.github.io/webdriver/webdriver-spec.html#element-send-keys)

There is no definition for an endpoint like 

POST/session/{session id}/keys
https://w3c.github.io/webdriver/webdriver-spec.html#list-of-endpoints

It is implemented in IE, chrome.  

Workaraound/Solution:

Use this endpoint instead:
POST/session/{session id}/element/{element id}/valueElement Send Keys


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/491e6f5a-7a54-4ff5-a496-91c381bdf35b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SendKeys not working in Firefox with Selenium 3.3.1 and GeckoDriver 0.15.0

shivani.gupta
In reply to this post by Selenium - Users mailing list
Thanks Dollar, it worked by adding
System.setProperty(
FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE,"false");


On Friday, March 31, 2017 at 9:48:11 AM UTC+5:30, kfauto13 wrote:
Selenium Version: 3.3.1
Geckodriver version: 0.15.0
Firefox version: Nightly (55.0.a1)

I updated Selenium yesterday to 3.3.1 and took the latest GeckoDriver 0.15.0. As a preface, everything works fine in Chrome and I didn't have to change any existing code.

When I try to run a test using Firefox, it successfully launches the browser and is able to click elements (buttons, the field I'm trying to input text into, etc) and navigate through the program. But I cannot figure out a way to get text entered into the field. I have put breakpoints and checked that Selenium can get the element, it's displayed, it's enabled, and everything comes back fine. I have even put some text into the field and verified that Selenium sees that text and it does. I am able to run just fine using Selenium 2.53 and an older version of the browser but we need to get Selenium 3 implemented. I have spent a couple of days googling the problems I'm running into and I'm not getting anywhere with this.

The error I receive when trying to enter text is this:

WARNING: Exception thrown
org.openqa.selenium.InvalidArgumentException: Expected [object Undefined] undefined to be a string
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'ADMINIB-8F07IP5', ip: '9.76.42.45', <a href="http://os.name" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fos.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBq5pahnbxzpNVLfaFeTDcQCtrYg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fos.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBq5pahnbxzpNVLfaFeTDcQCtrYg&#39;;return true;">os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\IBM_AD~1\AppData\Local\Temp\rust_mozprofile.oHMoJtANs1zD, rotatable=false, timeouts={implicit=0, pageLoad=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=55.0a1, platformVersion=6.1, moz:processID=12100, browserName=firefox, platformName=windows_nt}]
Session ID: 9b3f7bb1-48ae-4e36-afdd-12b1c4e7f7ef
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:88)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
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)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:274)
at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:495)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement$1.invoke(EventFiringWebDriver.java:332)
at com.sun.proxy.$Proxy15.sendKeys(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.sendKeys(EventFiringWebDriver.java:355)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:495)
at org.openqa.selenium.remote.server.KnownElements$1.invoke(KnownElements.java:64)
at com.sun.proxy.$Proxy16.sendKeys(Unknown Source)
at org.openqa.selenium.remote.server.handler.SendKeys.call(SendKeys.java:50)
at org.openqa.selenium.remote.server.handler.SendKeys.call(SendKeys.java:29)
at java.util.concurrent.FutureTask.run(FutureTask.java:277)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:785)

Has anyone had any experience with this? Unfortunately I'm unable to provide a link to test against as it's inside my company intranet.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/91e7687a-baf0-4da2-9fa9-8340e5b5c5e1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: SendKeys not working in Firefox with Selenium 3.3.1 and GeckoDriver 0.15.0

parshuAutomater
Hi ,
    I am using latest gecko driver 0.20.1 with firefox version 60.0.1  on Mac OSX 10.12
Python version is 2.7 ,selenium version 3.5
I want to send keys 'cmd+v' on firefox ,its not working .
It was working earlier with older selenium and Firefox versions.
Does any body aware of the issue ,if yes do you know any solution /workaround for this.

Thanks and Regards,
Parashuram




On Friday, 12 May 2017 18:51:29 UTC+5:30, [hidden email] wrote:
Thanks Dollar, it worked by adding
System.setProperty(
FirefoxDriver.SystemProperty.DRIVER_USE_MARIONETTE,"false");


On Friday, March 31, 2017 at 9:48:11 AM UTC+5:30, kfauto13 wrote:
Selenium Version: 3.3.1
Geckodriver version: 0.15.0
Firefox version: Nightly (55.0.a1)

I updated Selenium yesterday to 3.3.1 and took the latest GeckoDriver 0.15.0. As a preface, everything works fine in Chrome and I didn't have to change any existing code.

When I try to run a test using Firefox, it successfully launches the browser and is able to click elements (buttons, the field I'm trying to input text into, etc) and navigate through the program. But I cannot figure out a way to get text entered into the field. I have put breakpoints and checked that Selenium can get the element, it's displayed, it's enabled, and everything comes back fine. I have even put some text into the field and verified that Selenium sees that text and it does. I am able to run just fine using Selenium 2.53 and an older version of the browser but we need to get Selenium 3 implemented. I have spent a couple of days googling the problems I'm running into and I'm not getting anywhere with this.

The error I receive when trying to enter text is this:

WARNING: Exception thrown
org.openqa.selenium.InvalidArgumentException: Expected [object Undefined] undefined to be a string
Build info: version: '3.3.1', revision: '5234b32', time: '2017-03-10 09:04:52 -0800'
System info: host: 'ADMINIB-8F07IP5', ip: '9.76.42.45', <a href="http://os.name" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fos.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBq5pahnbxzpNVLfaFeTDcQCtrYg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fos.name\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEBq5pahnbxzpNVLfaFeTDcQCtrYg&#39;;return true;">os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{moz:profile=C:\Users\IBM_AD~1\AppData\Local\Temp\rust_mozprofile.oHMoJtANs1zD, rotatable=false, timeouts={implicit=0, pageLoad=300000, script=30000}, pageLoadStrategy=normal, platform=ANY, specificationLevel=0, moz:accessibilityChecks=false, acceptInsecureCerts=false, browserVersion=55.0a1, platformVersion=6.1, moz:processID=12100, browserName=firefox, platformName=windows_nt}]
Session ID: 9b3f7bb1-48ae-4e36-afdd-12b1c4e7f7ef
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:88)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
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)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:163)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:604)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:274)
at org.openqa.selenium.remote.RemoteWebElement.sendKeys(RemoteWebElement.java:98)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:495)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement$1.invoke(EventFiringWebDriver.java:332)
at com.sun.proxy.$Proxy15.sendKeys(Unknown Source)
at org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement.sendKeys(EventFiringWebDriver.java:355)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:495)
at org.openqa.selenium.remote.server.KnownElements$1.invoke(KnownElements.java:64)
at com.sun.proxy.$Proxy16.sendKeys(Unknown Source)
at org.openqa.selenium.remote.server.handler.SendKeys.call(SendKeys.java:50)
at org.openqa.selenium.remote.server.handler.SendKeys.call(SendKeys.java:29)
at java.util.concurrent.FutureTask.run(FutureTask.java:277)
at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1153)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.lang.Thread.run(Thread.java:785)

Has anyone had any experience with this? Unfortunately I'm unable to provide a link to test against as it's inside my company intranet.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/322313e8-134e-4636-9a40-a7228e7522ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.