I am a newbie to selenium just trying to learn. When tried opening Chrome browser through ChromeDriver I got the below error:
Traceback (most recent call last):
File "selenium_practise1_chrome.py", line 5, in <module>
driver = webdriver.Chrome()
File "C:UserskulokeshAppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriverchromewebdriver.py", line 75, in __init__
desired_capabilities=desired_capabilities)
File "C:UserskulokeshAppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriver
emotewebdriver.py", line 156, in __init__
self.start_session(capabilities, browser_profile)
File "C:UserskulokeshAppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriver
emotewebdriver.py", line 251, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:UserskulokeshAppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriver
emotewebdriver.py", line 320, in execute
self.error_handler.check_response(response)
File "C:UserskulokeshAppDataLocalProgramsPythonPython36libsite-packagesseleniumwebdriver
emoteerrorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: unable to discover open pages
(Driver info: chromedriver=2.40.565498 (ea082db3280dd6843ebfb08a625e3eb905c4f5ab),platform=a lotows NT 6.1.7601 SP1 x86_64)
Tried alot of googling but nothing helped. Below is my code:
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome()
driver.get('http://www.python.org')
print(driver.title)
This is not a code to deal with but I am confused what am I missing here.
Also please suggest some good online resource to learn Python Selenium.
My chrome opened was looking like below:
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…