Selenium with C Sharp -- How to perform Explicit Wait method

+2 votes
Hi Friends,

Please help me How to write Explicit wait method in C sharp selenium

Thanks,

Mahesh
Dec 22, 2019 in Selenium by mahesh
• 180 points
61 views

1 answer to this question.

+1 vote

The explicit wait is used to tell the Web Driver to wait for certain conditions (Expected Conditions) or the maximum time exceeded before throwing an "ElementNotVisibleException" exception.

  • This can be achieved with the combination of WebDriverWait and ExpectedConditions

  • WebDriverWait by default calls ExpectedCondition to poll by every 500 milliseconds until it returns successfully.

Here's the code snippet:

public static void ExplicitWait(WebDriver driver, WebElement element) {
   (new WebDriverWait(driver, 10)).until(ExpectedConditions.visibilityOf(element));
}
answered Dec 23, 2019 by Sirajul
• 46,080 points

Related Questions In Selenium

0 votes
1 answer

How to perform web scraping with Selenium?

Hey! The results are in the iframe so, ...READ MORE

answered Mar 25, 2019 in Selenium by Vaishnavi
• 1,170 points
130 views
0 votes
1 answer

How to perform double click using mouse actions in Selenium with Python?

Hi harsh, you can use ActionChains() class ...READ MORE

answered Jul 29, 2019 in Selenium by Abha
• 27,760 points
458 views
0 votes
1 answer
0 votes
1 answer

Impilicit wait vs Explicit wait vs Fluent wait

Implicit wait: Your telling the WebDriver the ...READ MORE

answered Apr 13, 2018 in Selenium by king_kenny
• 3,690 points
1,138 views
0 votes
1 answer

Implicit wait & Explicit wait in selenium WebDriver

Implicit Wait:  While loading a web page in ...READ MORE

answered May 24, 2018 in Selenium by Meci Matt
• 9,460 points
322 views
0 votes
1 answer

Not able to use “explicit wait” in my code

To wait until the entire data has ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,510 points
123 views
0 votes
1 answer
+2 votes
1 answer

C Sharp with Selenium -- How to Switch one tab to another tab in Csharp selenium

You could use Session.Driver.WindowHandles which is basically to switch ...READ MORE

answered Dec 23, 2019 in Selenium by Sirajul
• 46,080 points
115 views
+2 votes
2 answers

Unable to derive module descriptor for C:\Selenium\selenium-server-standalone-3.9.1.jar. Provider class org.apache.bsf.BSFManager not in module

The InvalidModuleDescriptorException usually occurs when you are trying to read ...READ MORE

answered 1 day ago in Selenium by Sirajul
• 46,080 points
909 views