4

I've been working with the following code, trying to introduce myself to selenium. When it runs, the chrome browser opens, but the page is blank, with no source code a far as I can tell, and 'data;' in the address bar. Any information on why this is happening would be greatly appreciated.

from selenium import webdriver

browser = webdriver.Chrome(service_args = ['--ignore-ssl-errors=true', '--ssl-protocol=TLSv1'])

url = 'https://www.google.com/'
browser.get(url) 

I have also tried it without the service_args and tried it specifying the driver path and both, but get the same result each time

4
  • Works for me. What OS are you using? Commented Sep 10, 2017 at 17:41
  • Does this happen for different URLs? Commented Sep 10, 2017 at 17:46
  • I've tried google and bing. I'm on windows 10 Commented Sep 10, 2017 at 18:10
  • You need to update the Selenium libs, drivers, and make sure that the browser is up-to-date. Commented Sep 11, 2017 at 0:09

6 Answers 6

4

The most possibility is your browser not compatible with the webdriver. Please confirm your browser version and webdriver version.

My chrome version is 60 and chromerdriver is chromedriver_2.30.exe

You can find compatible version from here

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you! I was using chrome version 60 and chromedriver_2.9. I went down to 2.3 and it works great!
0

Update the chromedriver and Chrome Browser, sometime I also faced this issue.

Comments

0

I don't see any error as such in your code. Though the documentation for service_args is missing in the Selenium-Python API Docs as well as in the ChromeDriver Getting started Doc. But 0096850 clearly suggests service_args is implemented.

The service_args works well at my end. Hence I suspect there is a mismatch between Selenium version, chromedriver version and Chrome version we are using. First and foremost, we have to ensure that our Selenium version, chromedriver version and Chrome version are compatible. You can find the compatibility information on the Downloads page of ChromeDriver individually for each releases.

The Downloads page clearly mentions:

Latest Release: ChromeDriver 2.32 Supports Chrome v59-61

Additionally, you may be required to pass the argument executable_path to mention the absolute path of the chromedriver binary as follows:

Windows 8 based code:

from selenium import webdriver

browser = webdriver.Chrome(executable_path=r'C:\Utility\BrowserDrivers\chromedriver.exe', service_args = ['--ignore-ssl-errors=true', '--ssl-protocol=TLSv1'])

url = 'https://www.google.com/'
browser.get(url) 

Comments

0

I've met the same problem,but I solved it by updating my webdriver Update your webdriver of chrome ,here is the link https://sites.google.com/a/chromium.org/chromedriver/downloads

Comments

0

If you're using Codeception, start the test with :

$I->amOnPage('/');

Comments

-1

simply add this argument to selenium options (google how add options on solenium python to how to add options argument)

 options.add_argument("--remote-debugging-port=9225")

1 Comment

While this code may answer the question, providing additional context regarding why and/or how this code answers the question improves its long-term value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.