New to Python Selenium and I want to select the 3rd:
<div class = "inner-TPBYkbxL" ...>
from the below 3 <div> classes with the same class name. I'm not sure what is meant by
<... "data-is-fake-main-panel" = "true" or "false">
after
<div class = "inner-TPBYkbxL" ...>
Snapshot:
How should I structure my selenium web driver script? I've tried the below:
driver.find_element_by_xpath("//div[@class='inner-TPBYkbxL']").click()
But it returned:
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
Generally
<div>elements aren't interactable barring some exceptational conditions. Hence when you invokeclick()on the<div>element identified by:You are facing:
This usecase
Not that super clear why you would click a
<div>element. However to identify the the element:you can use either of the following locator strategies:
Using CSS_SELECTOR:
Using XPATH:
Note : You have to add the following imports :