我试图在草稿文件夹中找到gmail.com的草稿,但它们完全是动态的,我不明白。
<td id=":5p" tabindex="-1" class="xY a4W">
<div class="xS" role="link">
<div class="xT"><div class="y6">
<span id=":5r">test e-mail</span>
<span class="y2"> - It's a test e-mail.</span> </div></div></div></td>
&#13;
答案 0 :(得分:0)
如果你想点击它,试试:
driver.FindElement(By.XPath("//a[@href='https://mail.google.com/mail/u/0/#drafts']")).Click();
或
driver.FindElement(By.XPath("//a[contains(text(),'Drafts')]")).Click();
答案 1 :(得分:0)
driver.FindElement(By.XPath("*//div[@class='y6']//span[contains(text(),'test e-mail')]")).Click();