W
W
Was_Ted2020-10-08 18:44:24
Python
Was_Ted, 2020-10-08 18:44:24

Selenium doesn't work when launched from Visual Studio Code, what should I do?

I run the code from Visual Studio Code - it opens the google window, but the site does not enter, in the address bar - the inscription "data:,". The name of the tab is "Untitled", instead of the tab icon - a folder with a sad face. If I run from the Python Interpreter, everything is in order, the page opens. What to do, how to make the code work from Visual Studio Code?

The code:

from selenium import webdriver

def main_func(driv1):
    driver = webdriver.Chrome(driv1)
    driver.get('https://instagram.com')
main_func('C:\chromedriver.exe')

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dimonchik, 2020-10-08
@dimonchik2013

deal with paths and imports

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question