I just installed OSX 10.9 on my mac and ever since then my Chromedriver is not working when I try to run tests.
The error I get is that "chrome was killed".
Everybody keeps mentioning that it works when you set Chromedriver to --verbose mode but I have no idea how to do that.
Any ideas?
Post version 59, Chrome supports headless execution. ChromeOptions class is utilized to modify the default characteristics of the browser. The addArguments method of the ChromeOptions class is used for headless execution and headless is passed as a parameter to that method.
In order to instantiate the object of ChromeDriver, you can simply create the object with the help of below command. Webdriver driver = New ChromeDriver(); The main motto of the ChromeDriver is to launch Google Chrome. Without that, it is not possible to execute Selenium test scripts in Google Chrome browser.
ChromeOptions is a new concept added in Selenium WebDriver starting from Selenium version 3.6. 0 which is used for customizing the ChromeDriver session. By default when selenium opens up any browser (Chrome browser or Firefox browser), it opens up without any extension or history or cookies, etc.
Here's a script that creates the executable you'll need, cd
to the directory where chromedriver is, then paste this into your console:
cat <<EOF>chromedriververbose
echo "running chromedriver --verbose \$*"
\$(dirname \$0)/chromedriver --verbose \$*
EOF
chmod +x chromedriververbose
That'll create an executable script called chromedriververbose
that you can point your tests at rather than chromedriver
.
Alternatively, you could rename chromedriver
to chromedriversilent
and then call the above script chromedriver
and point it to chromedriversilent
for drop-in replacement.
To fix this issue, you can download the latest Chromedriver version 2.6 which resolves this issue.
Link - http://chromedriver.storage.googleapis.com/index.html
I did the following from within the python console to test the verbose thing:
driver = webdriver.Chrome(service_args=["--verbose"])
It seemed to do the trick. Not ideal but it works for now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With