【发布时间】:2021-05-12 19:34:53
【问题描述】:
我有一个 3 点按钮,单击该按钮可配置网格上的元素。如果我一步一步通过它很好地通过它。当我调试我的脚本时,它在网格上看不到 3 点配置按钮。因为它走得太快了。
[Then(@ "user clicks on the configure for client buttons for main flow")]
public void ThenUserClicksOnTheConfigureForClientButtonsForMainFlow()
{
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(30);
IWebElement waitDots = new WebDriverWait(driver, TimeSpan.FromSeconds(30)).Until(ExpectedConditions.ElementExists((By.CssSelector("#grid > div.k-grid-content.k-auto-scrollable > table > tbody > tr:nth-child(3) > td:nth-child(4) > a"))));
Actions action = new Actions(driver);
action.MoveToElement(driver.FindElement(By.CssSelector("#grid > div.k-grid-content.k-auto-scrollable > table > tbody > tr:nth-child(3) > td:nth-child(4) > a > i"))).Build().Perform();
IWebElement ConfigureDots = driver.FindElement(By.CssSelector("#grid > div.k-grid-content.k-auto-scrollable > table > tbody > tr:nth-child(3) > td:nth-child(4) > a > i"));
ConfigureDots.Click();
}
【问题讨论】:
-
请edit您的问题包含完整的错误消息和堆栈跟踪,以及您尝试与之交互的代表性 HTML 数量。
标签: c# selenium-webdriver selenium-chromedriver specflow