0

Whenever I try it says Chrome closed unexpectedly and asks to reOpen. At python end it gives error:

  raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: was killed
  (Driver info: chromedriver=2.0,platform=Mac OS X 10.10.2 x86_64)

My code is:

driver = None
profile = webdriver.Chrome('/Setups/chromedriver')
driver.set_window_size(1128, 768) # optional
url = 'http://google.com'
driver.get(url)

Update: running in verbose mode gives this:

enter image description here

Volatil3
  • 14,253
  • 38
  • 134
  • 263

1 Answers1

0

You are trying to set size of none object. Try

driver = webdriver.Chrome('/Setups/chromedriver')
driver.set_window_size(1128, 768)
Guy
  • 46,488
  • 10
  • 44
  • 88
  • Same error despite of that silliness from my side: `riverException: Message: unknown error: Chrome failed to start: was killed` – Volatil3 Jan 23 '16 at 14:12
  • 1
    If you don't use the latest chrome driver version download it and try again. – Guy Jan 23 '16 at 14:16
  • *Google Chrome 47.0.2526.111 (Official Build) (64-bit)* It's the updated one? – Volatil3 Jan 23 '16 at 14:17
  • Not Google Chrome, ChromeDriver. Download from [here](https://sites.google.com/a/chromium.org/chromedriver/downloads), Last version 2.20 – Guy Jan 23 '16 at 14:20
  • [This](https://bugs.chromium.org/p/chromedriver/issues/detail?id=590) may also be useful. – Guy Jan 23 '16 at 14:21
  • I am on OSX 64 so I think that would be the issue? I already downloaded the latest one? – Volatil3 Jan 23 '16 at 14:22
  • adding `--verbose` did the trick but it is not navigating to URL and gives notification that I am opening Chrome without certificates. – Volatil3 Jan 23 '16 at 14:23
  • This message shouldn't cause problems (I have seen it before) – Guy Jan 23 '16 at 15:09
  • [This](http://stackoverflow.com/a/24169131/5168011) also might do the trick @Volatil3 – Guy Jan 23 '16 at 15:15