Oct-06-2020, 10:13 PM
1 2 3 4 5 6 7 8 9 10 |
from selenium import webbrowser webbrowser.get( "C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s" button = webbrowser.find_element_by_class_name( "slide-out-btn" ) button.click() |
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*