Python Selenium Element Click Behaving Strangeley
Loading a site with Chromedriver and trying to click a link based on the text. This is the site code for the link I'm looking for:
Copy
Is working only on <a>
tags, it won't work on <div>
click
is a function, it should be
link.click()
And for the find_element_by_id
, if the element is inside <frame>
you need to switch to it first
frame = driver.find_element_by_id("id")
driver.switch_to.frame(frame)
# continue with the code
link = Driver.find_element_by_id("hr_selection_18359391")
link.click()
And to switch back
driver.switch_to.default_content()
Post a Comment for "Python Selenium Element Click Behaving Strangeley"