Reputation: 108
I've few web links please let me know how I can visit their contact pages i've tried using but not working
contact_link = driver.find_element_by_partial_link_text('Contact')
and
driver.find_element_by_xpath('//a[contains(text(),"contact")]')
Every web page have different classes and different attributes so it is possible to do..
thanks
Upvotes: 0
Views: 5940
Reputation: 52665
Try this one on each page (each site homepage)
driver.find_element_by_xpath('//a[contains(@href,"contact")]').click()
Upvotes: 1