Reputation: 31
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>
Upvotes: 0
Views: 27
Reputation: 16187
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
Upvotes: 1