通过这一行,我点击了第一个文本,但是如何点击第二个确切文本?
driver.FindElement(By.PartialLinkText("Play")).Click();
答案 0 :(得分:-1)
使用此:
//get the list of elements which has same linkText
List<IWebElement> list = driver.findElements(By.partialLinkText("Play"));
//Click on each element by iterating the loop
foreach (IWebElement element in all)
{
element.click();
}