I used steps to run chrome script provided on this links its showing error
I Installed chrome driver as steps suggested in below link but its not working
https://github.com/zeljkofilipin/watirbook/blob/master/installation/windows.md#chrome-with-watir-webdriver
My PC configuration Win 7 & 64bit
C:/Ruby193/lib/ruby/gems/1.9.1/gems/ffi-1.0.9-x86-mingw32/lib/ffi/platform.rb:27
: Use RbConfig instead of obsolete and deprecated Config.
Started ChromeDriver
port=54035
version=20.0.1133.0
log=D:\chromedriver.log
=> #<Watir::Browser:0x3568d490 url="chrome://newtab/" title="New Tab">
irb(main):003:0> browser.goto "watir.com"
[0528/164700:ERROR:automation_proxy.cc(367)] Channel error in AutomationProxy.
Selenium::WebDriver::Error::UnknownError: Chrome did not respond to 'WaitForAllT
absToStopLoading'. Elapsed time was 1 ms.
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/response.rb:52:in `assert_ok'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/response.rb:15:in `initialize'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/http/common.rb:59:in `new'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/http/common.rb:59:in `create_response'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/http/default.rb:64:in `request'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/http/common.rb:40:in `call'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/bridge.rb:598:in `raw_execute'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/bridge.rb:576:in `execute'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/remote/bridge.rb:155:in `getCurrentUrl'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.21.2/lib/s
elenium/webdriver/common/driver.rb:118:in `current_url'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.5.8/lib/watir
-webdriver/browser.rb:78:in `url'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.5.8/lib/watir
-webdriver/browser.rb:66:in `goto'
from (irb):3
from C:/Ruby193/bin/irb:12:in `<main>'
irb(main):004:0>
I used the code as
>irb
> require "watir-webdriver"
=> true
> browser = Watir::Browser.new :chrome
Started ChromeDriver
port=49522
=> #<Watir::Browser:0x..fd
bf27548 url="about:blank"
title="about:blank">
> browser.goto "watir.com"
Thanks for providing details to check all versions. My version-> Its showing me 3 versions of watir webdriver
I uninstalled old versions now its working fine
Now my version its watir-webdriver (0.6.1)
if you have not already done so, try making sure that when you open a cmd window to start IRB or other watir scripts that you do so 'as administrator'. This can sometimes make a difference with Vista and Win7
Related
2022-03-08 11:21:22 WARN Selenium [DEPRECATION] [:driver_path] Selenium::WebDriver::Chrome#driver_path= is deprecated. Use Selenium::WebDriver::Chrome::Service#driver_path= instead.
An error occurred while loading spec_helper.
Failure/Error: browser = Capybara.current_session.driver.browser
Selenium::WebDriver::Error::SessionNotCreatedError:
session not created: This version of ChromeDriver only supports Chrome version 99
Current browser version is 98.0.4758.102 with binary path /usr/bin/google-chrome
The error message explains exactly what your issue is - You're using chromedriver v99.x with Chrome v98.x -- that won't work. Rather than trying to manually manage the version of chromedriver being used, just use the webdrivers gem to automatically manage it for you.
I have used RSelenium to scrape webpages without any issue for over a year including updating Chrome regularly. Today I updated Chrome to its latest version (89.0.4389.82). After the update, RSelenium can't connect to the server and times out. Here is the error message:
Selenium message:Timed out waiting for driver server to start.
System info: host: 'xxxx', ip: xxx, os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.5', java.version: '1.8.0_60'
Driver info: driver.version: unknown
Could not open chrome browser.
I also don't know why it says driver version unknown. I followed the guides on other simular questions and updated chromedriver to version 89.0.4389.23.
Here is the code that used to work before updating chrome:
driver <- rsDriver(browser=c("chrome"), chromever="87.0.4280.88", port = 4568)
Here is what I'm working with now which results in an error:
driver <- rsDriver(browser=c("chrome"), chromever="89.0.4389.23", port = as.integer(4568))
I was able to fix this thanks to this info I found. You can visit the link for more detailed information.
rsDriver has a boolean argument check that is TRUE by default. Its official description:
If TRUE check the versions of selenium available and the versions of
associated drivers (chromever, geckover, phantomver, iedrver). If new
versions are available they will be downloaded.
This downloads both chromedriver_mac64.zip and chromedriver_mac64_m1.zip. The chromedriver installed from the m1 file on Macs. What I did to fix the problem was go to
~/Library/Application Support/binman_chromedriver/mac64/89.0.4389.23
and then delete the m1 file and chromedriver. Then unzip chromedriver_mac64.zip to get the correct chromedriver. Go back to R and run rsDriver with the argument check set to false:
driver <- rsDriver(browser=c("chrome"), chromever="87.0.4280.88", port = 4568, check = FALSE)
This made it work for me
I know this question has been asked multiply times before but none of the solutions helps in my case.
I successfully did this no problem 3 months ago but am getting stuck now without changing anything which baffles me a lot and i really don't know what to do!
1:basic info:
win 7
Rselenium standalone 3.13.0 (tried 3.9.1 not working,used to work 3 months ago)
chrome version v64.0.3282.140 (32bit)
chromedriver 2.37 should be compatible.(also tried 2.38, 2.39 not work)
(I even updated chrome to 67 and use chromedriver 2.40 not work and then downgrade back)
2:launch Rselenium:
java -Dwebdriver.chrome.driver="C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe" -jar D:\selenium-server-standalone-3.13.0.jar
up and running no problem see the bottom pic-cmd snapshot
3:Rcode:
remDr <- remoteDriver(remoteServerAddr = "127.0.0.1"
, port = 4444
, browserName = "chrome")
remDr$open()
3 months ago it would launch a chrome page, but now the error shows:
Selenium message:Unable to create new service: ChromeDriverService
Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:32:19.891Z'
System info: host: 'A-PC', ip: '192.168.16.2', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '10.0.1'
Driver info: driver.version: unknown
Error: Summary: SessionNotCreatedException
Detail: A new session could not be created.
Further Details: run errorDetails method
I am not sure if it's because it doesn't detect the chrome version or the chromedriver version? But when I type chromedriver -version it shows the version is 2.37.
Please help!
cmd snapshot
I have had RSelenium fail with messages like that. I don't know the cause, but what worked to fix it was to delete all the downloaded driver files. On MacOS, they are in the ~/Library/Application Support/binman_* directories.
The next time I ran it, they were reinstalled automatically, and things worked fine again for a year or more.
Had the same issue. Yesterday everything was working fine, today also this Selenium message:Unable to create new service: ChromeDriverService error.
I saw a new chrome driver had downloaded overnight (on windows can be found in AppData/Local/binman/binman_chromedriver/win32/ - see picture below).
Deleting it did not help for me, because the non-working driver would be redownloaded again. It is not very pretty, but what worked for me was copying the chromedriver.exe file from the 2.42 folder into the 70.0.3538.16 folder.
I only had this issue with windows 8.1. On windows 10 the new driver did not cause issues.
On Linux, the RSelenium/Selenium seems to be behaving erratically. I start the server manually and it seems to start up fine. Sometimes I am able to connect to it from my R session and other times I get an error. I cannot yet pinpoint the cause: the same script seems to work sometimes and not other times. Any ideas?
Here is the output from starting the server:
12:41:25.811 INFO - Launching a standalone server
12:41:26.102 INFO - Java: Sun Microsystems Inc. 11.0-b16
12:41:26.102 INFO - OS: Linux 2.6.32-431.17.1.el6.x86_64 amd64
12:41:26.157 INFO - v2.44.0, with Core v2.44.0. Built from revision 76d78cf
12:41:26.492 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: LINUX
12:41:26.589 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
12:41:26.589 INFO - Version Jetty/5.1.x
12:41:26.590 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
12:41:26.590 INFO - Started HttpContext[/selenium-server,/selenium-server]
12:41:26.590 INFO - Started HttpContext[/,/]
12:41:36.597 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler#2993a66f
12:41:36.598 INFO - Started HttpContext[/wd,/wd]
12:41:36.601 INFO - Started SocketListener on 0.0.0.0:4444
12:41:36.601 INFO - Started org.openqa.jetty.jetty.Server#6f507fb2
The error I receive in my R session:
Couldnt connect to host on http://localhost:4444/wd/hub.
Please ensure a Selenium server is running.Error in queryRD(paste0(serverURL, "/session"), "POST", qdata = toJSON(serverOpts))
Other times, running the exact same script everything proceeds successfully. It could be a difference of what computer node actually executes the script but I cannot tell what the problem is when it will not connect.
library(RCurl)
library(RJSONIO)
library(XML)
# running selenium
system("java -jar selenium-server-standalone-2.44.0.jar")
I faced same issue and try to run above code. Finally know that there only support 1.7 but not 1.8 as time being. You might try to download jre7 and jdk7.
I faced the same error in Mac, but I noticed that due to security settings the system does not let me to run the file with that piece of code. I downloaded the selenium standalone file and using control key I single-clicked the file and then from the menu I chose the open. Then the problem get solved.
I'm trying to include in my rails application a date time selector, looking around I found this: http://www.malot.fr/bootstrap-datetimepicker/index.php
but when I try to compile it I get the following error:
$lessc build/build_standalone.less datetimepicker.css
/usr/local/rvm/gems/ruby-2.0.0-head/gems/less-2.3.2/bin/lessc:100:in `read': No such file or directory - datetimepicker.css (Errno::ENOENT)
from /usr/local/rvm/gems/ruby-2.0.0-head/gems/less-2.3.2/bin/lessc:100:in `<top (required)>'
from /usr/local/rvm/gems/ruby-2.0.0-head/bin/lessc:23:in `load'
from /usr/local/rvm/gems/ruby-2.0.0-head/bin/lessc:23:in `<main>'
I'm not too fresh with less could you please help me solve this?
the os is mac os 10.8.4
thanks,
solved:
the second parameter was not pointing correctly to the css file.
the correct commandline is :
$lessc build/build_standalone.less css/datetimepicker.css
thanks :)