1

I'm following Page Object Model on my test suite.

I have below method to wait for an element.

public void WaitTillCssSelector(string elemantName, int TimefromSeconds)
        {
            WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(TimefromSeconds));
            wait.Until(ExpectedConditions.ElementExists(By.CssSelector(elemantName)));

        }

Currently I'm passing elemantName as a string to the method.But as I'm using POM, I have already defined my CSSSelector as an IwebElement as below.

[FindsBy(How = How.CssSelector, Using = "div.wo-status-box.box-light-blue")]
public IWebElement CallPriorityTxt { get; set; }

Is there any way to directly pass the CallPriorityTxt variable to the above WaitTillCssSelector method?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.