mardi 4 septembre 2018

Selenium Explicit wait usage in C#

I am confused between the below-mentioned implementation of selenium explicit wait. Need your help in understanding how the later works as I am aware of how ExpectedConditions work.

Which according to you is the best way to follow?

public static void wait(IWebElement IW, IWebDriver d, int seconds) => new WebDriverWait(d, TimeSpan.FromSeconds(seconds)).Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(IW));

public static void wait(IWebElement IW, IWebDriver d, int seconds) => new WebDriverWait(d, TimeSpan.FromSeconds(seconds)).Until(driver=>IW.Displayed);

Aucun commentaire:

Enregistrer un commentaire