SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
345 stars 195 forks source link

Sendkeys() on remote webdriver not sending string - (selenium standalone 2.33, opera 12.15) #5789

Closed lukeis closed 8 years ago

lukeis commented 8 years ago

Originally reported on Google Code with ID 5789

What steps will reproduce the problem?
1. start seenium standalone server with console
2. prepare webdriver with this code
      IWebDriver webDriver;
      DesiredCapabilities opera = DesiredCapabilities.Opera();
      opera.SetCapability("opera.profile", @"C:\OperaProfile"); 
      webDriver = new RemoteWebDriver(opera);
3. find elent to send keys to (here a password field)
      WebElement element = webDriverWrapper.FindElement("passwordInputId");

4. send a string to the input element
      element.SendKeys(pass);

What is the expected output? What do you see instead?
password field should be filled with sended string. but the field stays empty. 

Selenium version: 2.33
OS: Win7 x64
Browser: Opera 
Browser version: 12.15

when entering a string in the element of intrest and calling element.clear(); right
before the sendkeys(), the field is cleared. So the problem is not with the wrong element.
this works for firefox, IE and chrome using their native webdrivers (FirefoxDriver(),...etc)

standalone server console output shows no error:
10:59:07.653 INFO - Executing: [send keys: 4 org.openqa.selenium.support.events.
EventFiringWebDriver$EventFiringWebElement@9f60, [a, d, m, i, n]] at URL: /sessi
on/64e5ae3e-71bb-4772-837a-f1b075b795a2/element/4/value)
10:59:07.691 INFO - Done: /session/64e5ae3e-71bb-4772-837a-f1b075b795a2/element/
4/value

thank you for looking into this issue!

Reported by moritzbahr on 2013-06-18 09:15:42

lukeis commented 8 years ago
Oh, forgot: im on C#. Thats why i use remotewebdriver on Opera instead of the Java driver
of Opera

Reported by moritzbahr on 2013-06-18 09:44:29

lukeis commented 8 years ago
Seems there is an issue with Visual Studio (2010). When setting a breakpoint while running
the test (before the sendkeys() method) and therefore stop the program progress, the
issue above occurs. When not doing this, the keys are sended as expected.

Reported by moritzbahr on 2013-06-18 10:01:10

lukeis commented 8 years ago
So is this issue resolved?

-will

Reported by williamalexandergreer on 2013-06-18 14:20:54

lukeis commented 8 years ago
I just upgraded the WebDriver C# bindings from 2.30.0 to 2.33.0 and noticed several
instances where the SendKeys method isn't entering information into the Chrome browser
(version 27.0.1453.116 m).

The ChromeDriver console looks like the SendKeys method completes

[114.036][INFO]: received WebDriver request: POST /session/c2e5fe59fdadf7d53528b53a95157a/element/.83335912615965:2/value
{
   "value": [ "F", "i", "l", "e", "n", "a", "m", "e" ]
}
[114.038][INFO]: waiting for pending navigations...
[114.038][INFO]: done waiting for pending navigations
[114.124][INFO]: waiting for pending navigations...
[114.125][INFO]: done waiting for pending navigations
[114.125][INFO]: sending WebDriver response: 200 {
   "sessionId": "c2e50f0e59fdadf7d53528b53a95157a",
   "status": 0,
   "value": null
}

But nothing happens within the browser. I have checked the XPath value used to get
the By reference ("//*[text()='File name']//following::input[1]") and other methods
for FindElement, such as and Click, work. SendKeys even works in other instances.

The site I was testing against did not change during the WebDriver upgrade.

Here is an example of the code I'm using to enter text into an element:

driver.FindElement(by).SendKeys( text );

Reported by thekyle on 2013-07-07 17:29:35

lukeis commented 8 years ago
Quick update, looks like it's not WebDriver. I just reverted the ChromeDriver from version
2.0 to 26.0.1383.0 and the issue went away.

Reported by thekyle on 2013-07-07 17:36:12

lukeis commented 8 years ago
Hi!

@moritzbahr - is the initial issue resolved ?

@thekyle - please create another issue. This is about Opera.

Reported by a.u.savchuk on 2013-07-21 14:13:19

lukeis commented 8 years ago
@ a.u.savchuk

no, the issue is not resolved. under the circumstances to debug the test. the opera
window obviously is mandatory to need focus with no interruption, so debugging it/using
breakpoints is not possible with VS, even if you manually give back the focus. i also
tried some js-code to focus to the element with no success.

Reported by moritzbahr on 2013-07-21 14:39:49

lukeis commented 8 years ago
Is this issue still actual? The attached screenshot shows that *in general* sendKeys
is nor broken in Opera, it can fill regular and password fields. I can also execute
the scenario step by step in debugger with Opera in background -- and the result is
the same, it works.

The scenario was (in Java):

WebDriver driver = new RemoteWebDriver(DesiredCapabilities.opera());
driver.manage().timeouts().implicitlyWait(10,  TimeUnit.SECONDS);
driver.get("https://twitter.com/");
driver.findElement(By.id("signin-email")).sendKeys("tester@test.com");
driver.findElement(By.id("signin-password")).sendKeys("mypassword");

Please provide a scenario and a sample page where we can reproduce the issue.

Reported by barancev on 2013-11-02 14:27:49

lukeis commented 8 years ago
Issue 5096 has been merged into this issue.

Reported by barancev on 2013-11-02 16:22:17

lukeis commented 8 years ago
In ant case, it is moved to OperaDriver tracker: https://github.com/operasoftware/operadriver/issues/86

Reported by barancev on 2013-11-02 17:21:48

lukeis commented 8 years ago

Reported by luke.semerau on 2015-09-17 18:17:26