Issue
How do I click this link using Selenium in Python? I've been able to get to the webpage using Selenium and click other links that have IDs. But this one doesn't have an ID or name.
<li ng-class="{active: currentTab == 'overview'}">
<a href="#" ng-click="tabDetailsNavigationClick('overview')">
Overview
</a>
</li>
Solution
Try:
WebDriverWait(driver,20).until(EC.element_to_be_clickable((By.XPATH,'//a[contains(.,"Overview")]'))).click()
#imports
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
Answered By - F.Hoque
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.