![]() |
Getting import error when trying to import Selenium - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: Getting import error when trying to import Selenium (/thread-30137.html) |
Getting import error when trying to import Selenium - Several - Oct-06-2020 from selenium import webbrowser webbrowser.get( "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s" ).open("https://www.geeksforgeeks.org") button = webbrowser.find_element_by_class_name("slide-out-btn") button.click()I am using selenium Output/errors: Traceback (most recent call last): File "C:/Users/Abdul_szuzdge/PycharmProjects/untitled/project2.py", line 4, in <module> from selenium import webbrowser ImportError: cannot import name 'webbrowser' from 'selenium' (C:\Users\Abdul_szuzdge\PycharmProjects\untitled\venv\lib\site-packages\selenium\__init__.py) Process finished with exit code 1 What I am trying too do: I am trying to make the script go to the site 'https://www.geeksforgeeks.org' and click the button P.S: I am new to python *I am using PyCharm* RE: Getting import error when trying to import Selenium - Larz60+ - Oct-06-2020 it's webdriver, not webbrowser |