I was watching this video about selenium browser automation: https://www.youtube.com/watch?v=SPM1tm2ZdK4
I wrote the same script as he wrote in 7:54
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
options = Options()
options.add_experimental_option("detach", True)
options.add_argument("--disable-search-engine-choice-screen") # I added this to delete the "Select a search engine" pop up
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()),
options=options)
driver.get("https://www.neuralnine.com/")
driver.maximize_window()
links = driver.find_element("xpath", "//a[@href]")
for link in links:
if "Books" in link.get_attribute("innerHTML"):
link.click()
break
But in his video it automatically clicks on books section while in my case nothing happens
I did what was in thew video and it should automatically click books, but it didn’t happen, and when I tried to use click in other scripts it also didn’t work. My browser size is set to 100%
Szymon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.