Closed GoogleCodeExporter closed 9 years ago
I have run following in the past, and it works
require "selenium-webdriver"
driver = Selenium::WebDriver.for :chrome
make sure chromedriver and chrome in your system path
Original comment by andrewch...@chromium.org
on 9 Mar 2015 at 10:55
Original comment by andrewch...@chromium.org
on 9 Mar 2015 at 11:09
It does and it is in fact the chrome window opens but still fails with this
message. Tried ensuring port was open et al. For the record I think this
might be a big with selenium but they sent it over here.
Original comment by jackiegl...@gmail.com
on 9 Mar 2015 at 11:10
[deleted comment]
I confirmed this does not work still. On a fresh VM I installed jRuby. I also
fully updated Elementary to make sure it wasn't an issue with an old dependency.
jruby -v
jruby 1.7.19 (1.9.3p551) 2015-01-29 20786bd on Java HotSpot(TM) 64-Bit Server
VM 1.8.0_40-ea-b02 +jit [linux-amd64]
$ chro<tab>
chromedriver chroot
So we know it is on the path
EOFError: End of file reached
from org/jruby/RubyIO.java:2858:in `read_nonblock'
from /home/test/Development/app/jruby/lib/ruby/1.9/net/protocol.rb:141:in `rbuf_fill'
from /home/test/Development/app/jruby/lib/ruby/1.9/net/protocol.rb:122:in `readuntil'
from /home/test/Development/app/jruby/lib/ruby/1.9/net/protocol.rb:132:in `readline'
from /home/test/Development/app/jruby/lib/ruby/1.9/net/http.rb:2571:in `read_status_line'
Original comment by jackiegl...@gmail.com
on 10 Mar 2015 at 1:22
Also it should also be noted that the chrome window does start and does not
crash when jruby does.
Original comment by jackiegl...@gmail.com
on 10 Mar 2015 at 1:23
Sorry also...
irb(main):001:0> require "selenium-webdriver"
=> true
irb(main):002:0> driver = Selenium::WebDriver.for :chrome
Selenium::WebDriver::Error::WebDriverError: unable to connect to chromedriver
http://127.0.0.1:9515
This one does not start an instance of chrome and crashes right away. This is
compared to what I did the first time which was...
require 'watir-webdriver'
browser = Watir::Browser.new :chrome
Original comment by jackiegl...@gmail.com
on 10 Mar 2015 at 1:26
in command line, can you do 'which chromedriver'?
Original comment by andrewch...@chromium.org
on 10 Mar 2015 at 6:46
$ which chromedriver
/home/test/bin/chromedriver
chromedriver -v
ChromeDriver 2.14.313457 (3d645c400edf2e2c500566c9aa096063e707c9cf)
Version 40.0.2214.111 (64-bit)
Original comment by jackiegl...@gmail.com
on 10 Mar 2015 at 10:05
is /home/test/bin/chromedriver in your system path?
Original comment by andrewch...@chromium.org
on 10 Mar 2015 at 11:24
Yup again the chrome window opens when I run and fails right away so I
don't think the path is the issue.
Original comment by jackiegl...@gmail.com
on 10 Mar 2015 at 11:42
can you change code to have log
require 'watir-webdriver'
LOG_FILE = 'C:\watir_1054.log'
b = Watir::Browser.new :chrome, :service_log_path => LOG_FILE
Original comment by andrewch...@chromium.org
on 10 Mar 2015 at 11:54
I am on linux so c:\ won't do anything :-P
So I upgraded to the newest jruby and I tried running again but now the window
won't even open and I keep getting....
irb(main):004:0> LOG_FILE = '/home/test/watir_1054.log'
=> "/home/test/watir_1054.log"
irb(main):005:0> b = Watir::Browser.new :chrome, :service_log_path => LOG_FILE
Selenium::WebDriver::Error::WebDriverError: unable to connect to chromedriver http://127.0.0.1:9515
I also don't see anything in that folder in terms of the log file. I confirmed
writing to the location works with...
File.open('/home/test/test.txt', 'w') { |file| file.write("your text") }
This worked fine
Original comment by jackiegl...@gmail.com
on 11 Mar 2015 at 1:46
also because I saw the old post about this....
ls -al bin/chromedriver
-rwx--x--x 1 test test 4908952 Jan 28 04:09 bin/chromedriver
Original comment by jackiegl...@gmail.com
on 11 Mar 2015 at 1:54
For # 11, can you modify whatever the codes you have to include log
since at that point at least you have chromedriver launched
Original comment by andrewch...@chromium.org
on 11 Mar 2015 at 1:59
Yeah this is def in selenium....
var wd = require('selenium-webdriver');
var driver = new wd.Builder().
withCapabilities(wd.Capabilities.chrome()).build();
driver.get('http://www.google.com')
using the nodejs only problem is I can't use pre-release node because it fails
to compile.
Any idea how I push this back to Selenium?
Original comment by jackiegl...@gmail.com
on 11 Mar 2015 at 2:36
Sorry I was trying to say node works great so this must be in the service of
the rb file.
Original comment by jackiegl...@gmail.com
on 11 Mar 2015 at 2:38
Sure I can try but I am not the best at ruby and the previous code you
provided does not work like I said previously.
Original comment by jackiegl...@gmail.com
on 11 Mar 2015 at 3:05
just followed your step in # 1 on Linux(Ubuntu)
no error, and Chrome launched successfully
irb(main):001:0> require 'watir-webdriver'
=> true
irb(main):002:0> browser = Watir::Browser.new :chrome
=> #<Watir::Browser:0x7efb2c86e1b2aba2 url="data:," title="data:,">
irb(main):003:0>
I have run on both Window 7 and Ubuntu, and they are all good.
Original comment by andrewch...@chromium.org
on 11 Mar 2015 at 11:43
First of all I am sure windows is working because my 7 server works fine, I am
sorry for making you think there was a problem with that.
As for ubuntu what version were you using? I am using Elementary not straight
Ubuntu and to be honest I haven't tried the latest ubuntu. Was your Ubuntu a
clean install or an old VM you were using? What does your ruby -v look like?
Original comment by jackiegl...@gmail.com
on 12 Mar 2015 at 12:00
* sorry jruby -v my ruby doesn't exist because it isn't installed on this box
(Again I am using jRuby)
Original comment by jackiegl...@gmail.com
on 12 Mar 2015 at 12:01
yeah unless I install ruby from source I can't even get access to anything
higher than 1.9.1 which is lower than the 1.9.2 needed for the zip product. I
would bet you have something preconfigured
Original comment by jackiegl...@gmail.com
on 12 Mar 2015 at 12:19
ruby
The program 'ruby' can be found in the following packages:
* ruby1.8
* ruby1.9.1
Original comment by jackiegl...@gmail.com
on 12 Mar 2015 at 12:20
yeah I installed ruby 1.9.3 and this works fine, however, it doesn't help me
with my original requirement which is jRuby. We need the java version to be
able to access h2 data.
Original comment by jackiegl...@gmail.com
on 12 Mar 2015 at 12:41
as you can see jruby is a little different ruby version but I downloaded the
newest one....
jruby 1.7.9 (1.9.3p392) 2013-12-06 87b108a on Java HotSpot(TM) 64-Bit Server VM
1.8.0_40-ea-b02 +indy [linux-amd64]
$ ruby -v
ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-linux]
Original comment by jackiegl...@gmail.com
on 12 Mar 2015 at 12:42
I have
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
Original comment by andrewch...@chromium.org
on 12 Mar 2015 at 1:10
test@test-VirtualBox:~/tmp$ which jruby
/home/test/Development/app/jruby/bin/jruby
test@test-VirtualBox:~/tmp$ jruby -v
jruby 9.0.0.0.pre1 (2.2.0p0) 2015-01-20 d537cab Java HotSpot(TM) 64-Bit Server
VM 25.40-b05 on 1.8.0_40-ea-b02 +jit [linux-amd64]
but when I run irb...
irb
Ignoring executable-hooks-1.3.2 because its extensions are not built. Try: gem
pristine executable-hooks --version 1.3.2
Ignoring ffi-1.9.6 because its extensions are not built. Try: gem pristine ffi
--version 1.9.6
Ignoring gem-wrappers-1.2.7 because its extensions are not built. Try: gem
pristine gem-wrappers --version 1.2.7
1.9.3p392 :001 >
Notice the 1.9.3 WTF I am looking more into this but it looks like selenium is
no longer supported on elementary using jruby unless you are using the
pre-release.
Original comment by jackiegl...@gmail.com
on 12 Mar 2015 at 1:13
See again you are using ruby I appreciate your help so please don't take this
in the wrong way. I am pretty sure this issue is very specific. In other words,
running on regular ruby (apparently anything after p392) works fine but
anything pre (including the current version of jruby) does not work
Original comment by jackiegl...@gmail.com
on 12 Mar 2015 at 1:15
Not to mention I am pretty sure stock ubuntu doesn't support ruby 1.9.1+ by
default meaning technically most debian systems are not supported.
Original comment by jackiegl...@gmail.com
on 12 Mar 2015 at 1:16
Double checked the default with the latest ubuntu is...
1.9.3p484
Meaning it is > the jruby version so this would work using default ruby on
ubuntu.
Original comment by jackiegl...@gmail.com
on 12 Mar 2015 at 1:38
but again I need the jRuby for h2
Original comment by jackiegl...@gmail.com
on 12 Mar 2015 at 1:39
I don't know jRuby well.
Can you get your problem to solve with right jRuby?
Original comment by andrewch...@chromium.org
on 12 Mar 2015 at 1:43
I did look and it seems like I had an older version of JRuby I tried the newest
as of today on ubuntu and no luck doesn't work. So pretty sure this is isolated
to jruby.
Original comment by jackiegl...@gmail.com
on 12 Mar 2015 at 2:32
look like nothing need to be fixed on chromedriver and chrome.
JRuby run Ruby in Java VM may have memory issue
Original comment by andrewch...@chromium.org
on 12 Mar 2015 at 5:26
Please report it to the selenium or jruby bug tracker. I don't have permissions
to move it back to the selenium tracker.
Original comment by gmanikp...@chromium.org
on 17 Mar 2015 at 9:20
Original issue reported on code.google.com by
jackiegl...@gmail.com
on 20 Jan 2015 at 7:49