Advertisement
Guest User

Untitled

a guest
Oct 25th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.15 KB | None | 0 0
  1. # use selenium to start Chrome session to open a certain page(Change to google for privacy reasons).
  2. dr = webdriver.Chrome()
  3. dr.get("http://www.google.com")
  4.  
  5. ---------------------------------------------------------------------------
  6. WebDriverException Traceback (most recent call last)
  7. <ipython-input-25-84be89301b0d> in <module>()
  8. 1 # use selenium to start Chrome session to open google.
  9. ----> 2 dr = webdriver.Chrome()
  10. 3 dr.get("http://www.google.com")
  11.  
  12. /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/chrome/webdriver.py in __init__(self, executable_path, port, chrome_options, service_args, desired_capabilities, service_log_path)
  13. 65 command_executor=ChromeRemoteConnection(
  14. 66 remote_server_addr=self.service.service_url),
  15. ---> 67 desired_capabilities=desired_capabilities)
  16. 68 except:
  17. 69 self.quit()
  18.  
  19. /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py in __init__(self, command_executor, desired_capabilities, browser_profile, proxy, keep_alive)
  20. 85 self.error_handler = ErrorHandler()
  21. 86 self.start_client()
  22. ---> 87 self.start_session(desired_capabilities, browser_profile)
  23. 88 self._switch_to = SwitchTo(self)
  24. 89 self._mobile = Mobile(self)
  25.  
  26. /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py in start_session(self, desired_capabilities, browser_profile)
  27. 139 desired_capabilities['firefox_profile'] = browser_profile.encoded
  28. 140 response = self.execute(Command.NEW_SESSION, {
  29. --> 141 'desiredCapabilities': desired_capabilities,
  30. 142 })
  31. 143 self.session_id = response['sessionId']
  32.  
  33. /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/remote/webdriver.py in execute(self, driver_command, params)
  34. 199 response = self.command_executor.execute(driver_command, params)
  35. 200 if response:
  36. --> 201 self.error_handler.check_response(response)
  37. 202 response['value'] = self._unwrap_value(
  38. 203 response.get('value', None))
  39.  
  40. /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/selenium/webdriver/remote/errorhandler.py in check_response(self, response)
  41. 179 elif exception_class == UnexpectedAlertPresentException and 'alert' in value:
  42. 180 raise exception_class(message, screen, stacktrace, value['alert'].get('text'))
  43. --> 181 raise exception_class(message, screen, stacktrace)
  44. 182
  45. 183 def _value_or_default(self, obj, key, default):
  46.  
  47. WebDriverException: Message: session not created exception
  48. from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"7600.1","isDefault":true},"id":1,"name":"","origin":"://"}
  49. (Session info: chrome=54.0.2840.71)
  50. (Driver info: chromedriver=2.20.353124 (035346203162d32c80f1dce587c8154a1efa0c3b),platform=Mac OS X 10.11.6 x86_64)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement