question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Firefox Driver sendKeysToActiveElement

See original GitHub issue

This is on Firefox 45 on OSX, with the Firefox Driver. I’m seeing this behavior both local & via remote server. I tested with FF 45 before it was released and didn’t see this behavior, and I’m pretty sure we’re testing this in the CI. So, I’m not sure why I’m seeing this right now. Can anyone duplicate?

Expected Behavior -

Post to session/:session_id/keys should type into body of page

Actual Behavior -

Opening a page and sending key command is putting the text into the url bar: screen shot 2016-03-12 at 5 03 11 pm

Steps to reproduce -

-> POST session/942089a8-b772-4c9a-9a14-78ce2a76c5f8/url
   >>> http://127.0.0.1:4444/wd/hub/session/942089a8-b772-4c9a-9a14-78ce2a76c5f8/url | {"url":"http://ci.seleniumhq.org:2310/common/javascriptPage.html"}
     > {"Accept"=>"application/json", "Content-Type"=>"application/json; charset=utf-8", "Content-Length"=>"66"}17:02:30.845 INFO - Done: [new session: Capabilities [{rotatable=false, nativeEvents=false, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, version=, platform=ANY, cssSelectorsEnabled=true}]]
17:02:30.851 INFO - Executing: [get: http://ci.seleniumhq.org:2310/common/javascriptPage.html])
17:02:31.169 INFO - Done: [get: http://ci.seleniumhq.org:2310/common/javascriptPage.html]
<- {"state":"success","sessionId":"942089a8-b772-4c9a-9a14-78ce2a76c5f8","hCode":512158199,"value":null,"class":"org.openqa.selenium.remote.Response","status":0}
-> POST session/942089a8-b772-4c9a-9a14-78ce2a76c5f8/keys
   >>> http://127.0.0.1:4444/wd/hub/session/942089a8-b772-4c9a-9a14-78ce2a76c5f8/keys | {"value":["ab"]}
     > {"Accept"=>"application/json", "Content-Type"=>"application/json; charset=utf-8", "Content-Length"=>"16"}
17:02:31.174 INFO - Executing: [send keys to active: [ab]])
17:02:31.234 INFO - Done: [send keys to active: [ab]]
<- {"state":"success","sessionId":"942089a8-b772-4c9a-9a14-78ce2a76c5f8","hCode":31064293,"value":null,"class":"org.openqa.selenium.remote.Response","status":0}```

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
BillalPatelcommented, Sep 15, 2017

@Y-- I just changed it to: .sendKeys(protractor.Key.ENTER) I hope this helps you 😃

0reactions
Y--commented, Sep 13, 2017

@BillalPatel would you mind sharing your work around? Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firefox Driver sendKeysToActiveElement · Issue #1792 - GitHub
This is on Firefox 45 on OSX, with the Firefox Driver. I'm seeing this behavior both local & via remote server.
Read more >
Always getting a "Failed: sendKeysToActiveElement" error ...
I am always getting a "Failed: sendKeysToActiveElement" error while working on any of the keyboard actions of the actions class in protractor.
Read more >
SendKeys not working in Firefox with Selenium 3.3.1 and ...
I have faced issue with Geckodriver while clicking an element. I can just give alternatives. 1. Did you try using System.setProperty(FirefoxDriver.
Read more >
Troubleshooting (WEB) - Firefox SendKey command limitation
Selenium.Interactions.Keyboard is throwing exception: "Exception in thread "main" org.openqa.selenium.UnsupportedCommandException: sendKeysToActiveElement".
Read more >
RSelenium: R Bindings for 'Selenium WebDriver'
'Selenium 2.0 WebDriver' allows driving a web browser ... getFirefoxProfile A utility function to get a firefox profile.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found