Мне нужно нажать на подтверждение по электронной почте в моем почтовом ящике.но невозможно щелкнуть ссылку.
вот мой HTML-код и пробный код
<td bgcolor="#ffffff" style="padding:20px;">
<div style="color:rgb(0,0,0);font-size:16px;">
<strong>You are almost done!</strong><br><br>
To complete Sunday Lankadeepa E-Paper registration, please click the link below:
</div>
<br><br>
<div style="width:616px;">
<a href="http://Sundaylankadeepa.newspaperdirect.com/epaper/confirmmail.aspx?code=ZUZ3S2K17GR&rt=trial" rel="nofollow">
http://Sundaylankadeepa.newspaperdirect.com/epaper/confirmmail.aspx?code=ZUZ3K17GR&rt=trial</a>
</div>
<br><br>
If clicking the link doesn't work, please select and copy the entire link. Then open a browser, paste the link in the address bar, and press Enter or Return on your keyboard.
пробный код ...
text = "newspaperdirect"
element = driver.find_element_by_xpath('//a[contains(text(),"%s")]' % text)
element.click()
Ошибка:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element:
{"method":"xpath","selector":"//a[contains(text(),"newspaperdirect")]"}
(Session info: chrome=71.0.3578.98)
(Driver info: chromedriver=2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387),
platform=Windows NT 6.2.9200 x86_64)