I am a complete beginner to selenium and I wrote my first program just to connect to Google.
from selenium import webdriver path = "C:\Users\Home\Documents\Python37-32\Scripts\Code\msedgedriver.exe" driver = webdriver.Edge(path) driver.get("https://google.com") print(driver.title)"
My web driver version is 88.0.705.50 (Official build) (64-bit)
88.0.705.50 (Official build) (64-bit)
I use selenium 3 and I am getting this error while running the code. Also it is opening "data:," for a few seconds then opening Google. Lastly the browser doesn't stay open.
"data:,"
Declare path on a separate line from the import statement
Use raw string in path or double escapes
Code:
from selenium import webdriver path = r"C:UsersHomeDocumentsPython37-32ScriptsCodemsedgedriver.exe" driver = webdriver.Edge(path) driver.get("https://google.com") print(driver.title)
1.4m articles
1.4m replys
5 comments
57.0k users