Answer the question
In order to leave comments, you need to log in
How to open an element using Selenium?
def get_body(link, element2click):
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(executable_path="D:\\WebDriver\\chromedriver.exe", options=options)
driver.maximize_window()
sleep(2)
driver.get(link) # puts here your link
sleep(2)
if element2click:
driver.find_element_by_class_name(element2click).click()
sleep(10)
html = driver.page_source
return html
Answer the question
In order to leave comments, you need to log in
What's the problem? Just click on the arrow. If it doesn't work with selenium, then try clicking with JS
driver.executeScript("arguments[0].click();", element);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question