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
109 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
• 53,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,180 points
291 views
0 votes
1 answer
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,920 points
704 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,710 points
1,431 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
433 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
167 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
• 53,080 points
728 views
0 votes
1 answer

String insId=RecInspage.getInsIdByTransportName(driver, fileName).getText(); I want to give explicit wait for this how to write code?

Check out this link https://www.edureka.co/blog/waits-in-selenium/ This will give you ...READ MORE

answered Apr 26 in Selenium by Sirajul
• 53,080 points
26 views