【发布时间】:2019-12-27 12:02:22
【问题描述】:
在我的 Selenium webdriver 中,我根据某个关键字搜索文本:
new WebDriverWait(driver,
TimeSpan.FromSeconds(5)).Until(ExpectedConditions.ElementExists((By.PartialLinkText(stringKeywords))));
我想获取我找到的全文并将其保存到一个字符串中。我怎么能做到这一点?我在某个地方找到了这个,但它不允许我将它用作字符串,因为它是一个 IWebElement。对我有帮助吗?
IWebElement txtbox = driver.FindElement(By.PartialLinkText(stringKeywords));
【问题讨论】:
标签: c# selenium selenium-webdriver webdriver getattribute