So, I started using this wonderful function:
[FindsBy(How = How.CssSelector, Using = "div.location:nth-child(1) > div:nth-child(3)")] public IWebElement FirstLocationTile { get; set; }
But the problem is that it does not work in my WebDriverWait code!
A concrete example where I cannot reuse my FirstLocationTile. He insists on having By .:
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(BaseTest.defaultSeleniumWait)); wait.Until(ExpectedConditions.ElementIsVisible(By.CssSelector("div.location:nth-child(1) > div:nth-child(3)")));
Any ideas?
source share