One of the error codes I am getting is this I don't really understand why I am getting it (vs code py 3.9.1)
Traceback (most recent call last): File "c:UsersjtwwiTest1.py", line 3, in <module> api = webdriver.Firefox() ``
Code trials:
from selenium import webdriver api = webdriver.Firefox() api.get("https://www.youtube.com") elem = api.find_elements_by_id("search")[1] elem.send_keys("Your Search") elem.submit()
api is a keyword and you need to replace it with some other variable name. As an example:
api
driver = webdriver.Firefox()
1.4m articles
1.4m replys
5 comments
57.0k users