FuckTheWorld / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

The "/" key is not typed in VNC mode on Linux, typed as if HOME key instead, firefox okay chrome not #707

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
See http://goo.gl/ll2FvQ for common issues.

Issue Description:

Here is a weird issue that must be resolved for me to run the majority of my 
test on linux. This does not happen with Firefox, and this does not happen 
without using VNC displays (i.e. when using standard :0 display). Unlucky for 
me, all tests on linux in our testing environment run with VNC displays, so I 
can't run any of these right now.

Linux version: Debian 7
ChromeDriver: v2.5.244503 (I had to build this myself since I tried as new as 
chromedriver2.9 which does not work on my Debian system due to issues listed at 
issue #454)
Chrome: 32.0.1700.77

Type "/" using selenium sendKey method, works on normal display, but fails when 
switching display to a vnc display on linux

Steps to reproduce (if relevant, you MUST provide a simplified html page or
link to public site):

Launch chrome using --no-sandbox option on linux (just so that you reproduce 
exactly what I do, I do not have a way currently to run without this switch)

On the test Page attached

  webElement = wd.findElement(By.id("aTextarea"));
  webElement.sendKeys("/");
  assertThat(webElement.getText(), is("/")); // same with getValue, always get a "" back

But run this test on linux with (a) standard display (b) setenv DISPLAY 
host:number where number is a VNC display number. It fails only with (b)

Basically what appears to be typed is HOME rather than the slash

if you try a/b instead, you will end up with ba!

All this does not happen when running in the normal display :0 on the machine, 
just with VNC

See 'file.txt' which is the verbose chromedriver log

I also use these chromeoptions if they are relevant

"chromeOptions": {
         "args": [ "--chrome-version=32.0.1700.77", "--disable-popup-blocking", "--no-sandbox" ],
         "extensions": [  ],
         "prefs": {
            "autofill.auxiliary_profiles_enabled": false,
            "autofill.enabled": false
         }
      },

-----Other helpful tips:
Attach your chromedriver log with verbose logging enabled (see
http://goo.gl/5Sx8mC for how to do this).

Original issue reported on code.google.com by bino...@gmail.com on 17 Feb 2014 at 10:10

Attachments:

GoogleCodeExporter commented 9 years ago
Adding that I did manage to get chromedriver2.9 working on my system, but it 
still fails the same way, so it has not fixed the issue

Original comment by bino...@gmail.com on 17 Feb 2014 at 10:17

GoogleCodeExporter commented 9 years ago
some more data, typing "a/b" results in "b newline a"

Original comment by bino...@gmail.com on 17 Feb 2014 at 10:30

GoogleCodeExporter commented 9 years ago
just pinging...

Original comment by bino...@gmail.com on 13 May 2014 at 4:12

GoogleCodeExporter commented 9 years ago
I am seeing the exact some issue.  Using Xvnc4 on machines provided by circleci

Original comment by ben.bern...@gmail.com on 4 Jun 2014 at 12:05

GoogleCodeExporter commented 9 years ago
any updates?

I also verified that typing / alone works

but if I prepend another character before / it still fails, this continues to 
happen with chromedriver 2.10

Original comment by bino...@gmail.com on 3 Sep 2014 at 6:03

GoogleCodeExporter commented 9 years ago
OK, I confirmed this issue exists and is related to 
https://code.google.com/p/selenium/issues/detail?id=7540. I can reproduce both 
issues when running under tightvnc / vncserver on linux. The problem doesn't 
reproduce when using Xvfb, instead.

I'll be digging deeper soon, as this is also affecting Sauce Labs, but in the 
meantime, using Xvfb should do the trick.

Sorry for the late investigation!

Original comment by santiycr on 7 Sep 2014 at 4:58

GoogleCodeExporter commented 9 years ago
Issue 895 has been merged into this issue.

Original comment by barancev on 7 Sep 2014 at 6:19

GoogleCodeExporter commented 9 years ago
Any updates? Just a comment that "pasting a ‘/’ works in case it sheds any 
lights, thanks

Original comment by bino...@gmail.com on 13 Oct 2014 at 1:05

GoogleCodeExporter commented 9 years ago
one more data point, typing a// gives me /a , so the second slash works!

Original comment by bino...@gmail.com on 10 Nov 2014 at 9:29

GoogleCodeExporter commented 9 years ago
I am having the same issue.

sending           "https://github.com/angular/protractor"
what is typed: "protractorangular/github.comhttps:"

I tried sending DIVIDE key instead of '/' and the string is not broken now, but 
still no '/':
"https:github.comangularprotractor"

seems that it is happening in Chromedriver.
The Firefoxdriver works correctly.

Thank you.

Original comment by mvashchi...@outbrain.com on 9 Dec 2014 at 2:19

GoogleCodeExporter commented 9 years ago

Original comment by samu...@chromium.org on 21 Feb 2015 at 12:18

GoogleCodeExporter commented 9 years ago
Same here with chromedriver 2.14.313457

Original comment by michael....@grawe.at on 16 Mar 2015 at 8:04

GoogleCodeExporter commented 9 years ago
Issue is not reproducible with chrome 2.14, chromev41 Ubuntu:14.4

Steps tried:
Installed vncviewer, vncserver
Created vnc display with 'vncserver'
Launched vnc display with "vncviewer :1"
In standard terminal ran export DISPLAY=localhost:1
Ran grid's hub and node commands in vnc terminal

Ran below code:
WebDriver driver = new RemoteWebDriver(new 
URL("http://localhost:4444/wd/hub"),DesiredCapabilities.chrome());
driver.get("file:///user/Html/Bug_707.html"));
WebElement ele = driver.findElement(By.id("aTextArea"));
ele.sendKeys("/");
ele.sendKeys("a/b");
driver.findElement(By.id("aTextbox")).sendKeys("a/b");
System.out.println(ele.getAttribute("value"));

Please try again with latest versions and let us know if we differ from what 
you are doing

Note: To get text from text fields (input type=text, text area), we can use 
getAttribute("value").

Original comment by ssudunag...@chromium.org on 1 Apr 2015 at 6:23

GoogleCodeExporter commented 9 years ago
binod80

please try with latest versions of chromedriver and chrome browser using sample 
code provided in comment #13 and let us know if you are still facing the issue.

Original comment by ssudunag...@chromium.org on 18 May 2015 at 10:25

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi,

I work with binod.

We tried using chrome 43 with chrome driver 2.15 on our debian host, but the 
issue is still reproducible.

Thanks
Tanvi

Original comment by tanvi.gour on 11 Jun 2015 at 2:47