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));


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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.