C# Selenium 'ExpectedConditions is obsolete'

前端 未结 7 1805
灰色年华
灰色年华 2020-11-28 04:51

When trying to explicitly wait for an element to become visible using ExpectedConditions, Visual Studio warns me that it is now obsolete and will be removed from Selenium so

7条回答
  •  长情又很酷
    2020-11-28 05:20

    Nuget required - DotNetSeleniumExtras.WaitHelpers

    WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(By.XPath("")));

    I just demonstrated the element clickable event. similarly, other events can be used with the required parameters. I hope this helps

提交回复
热议问题