What is Fluent Wait in Selenium WebDriver? (Interview Question #16)

  Рет қаралды 9,521

QAFox

QAFox

Күн бұрын

Пікірлер: 23
@sunil100r
@sunil100r 2 жыл бұрын
This is the best explanation of Webdriver wait and Fluent wait that I have seen. One question is polling 7 or 4 times it doesn't matter right but finally it's waiting for 3 seconds. What is the difference?
@QAFox
@QAFox 2 жыл бұрын
Fluent Wait is an advanced version of Webdriver Wait, which provides an extra customization in polling time. Other than that there is no difference. In real time, hence we use WebDriver Wait for explicit wait.
@miral-mamun6145
@miral-mamun6145 Жыл бұрын
Class WebDriverWait is a disciplined child (Specialization) of Class FluentWait and grand child of interface Wait. In short, Class FluentWait implements Wait interface and WebDriverWait extends FluentWait. So there are many things common in WebDriverWait and FluentWait instances such as :- You can set polling interval in both instances. You can ignore any exceptions in both instances. You can use ExpectedConditions methods in both instances. You can override apply() method in both instances. If they are common then why WebDriverWait is given? We could have used FluentWait itself. But the major difference between them is that WebDriverWait is a specialization of FluentWait which uses WebDriver instance and this class have added specific mechanism related to WebDriver. That's why it ignores instances of NotFoundException by default. In case of FluentWait, If you need to ignore any exception in FluentWait instance, you need to mention it explicitly.
@shankarprasad2454
@shankarprasad2454 3 жыл бұрын
Excellent simple and precise!
@QAFox
@QAFox 3 жыл бұрын
Thank you :)
@reshmapn7941
@reshmapn7941 3 жыл бұрын
It's very clear and concise explanation sir Thank you
@QAFox
@QAFox 3 жыл бұрын
Welcome Reshma :)
@pujasaha5452
@pujasaha5452 2 жыл бұрын
Best explanation ..great work 👌
@QAFox
@QAFox 2 жыл бұрын
Thank you :)
@swapnil3835
@swapnil3835 2 жыл бұрын
Explanation is awesome ... Thank u sir
@QAFox
@QAFox 2 жыл бұрын
Welcome :)
@anygamer2792
@anygamer2792 2 жыл бұрын
Sir how we can write fluent wait for framework level Eg, where ever required fluent wait we can simply call that function. Can you tell. Me how to do that?
@sasireka7974
@sasireka7974 2 жыл бұрын
Sir,mostly in our project which wait is used fluent or explicit
@QAFox
@QAFox 2 жыл бұрын
Explicit WebDriverWait is used in projects.
@miral-mamun6145
@miral-mamun6145 Жыл бұрын
WebDriverWait is a ready to use class for WebDriver. WebDriverWait can not be used for a non-selenium waiting condition while FluentWait can be used.
@udayshankar385
@udayshankar385 2 жыл бұрын
Your Explanation is good ! but you know even you can override default polling time of WebdriverWait. like this: WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(30)); wait.pollingEvery(Duration.ofSeconds(2)); because at 14:29 you said that you can not customize default polling time of WebDriverWait, which is not true .
@QAFox
@QAFox 2 жыл бұрын
Earlier while recording the video, I didn't know that. But later I got to know. Will create a video on this soon.
@udayshankar385
@udayshankar385 2 жыл бұрын
@@QAFox Thank you!
@QAFox
@QAFox 2 жыл бұрын
@@udayshankar385 Welcome :)
@kiranbarhate2118
@kiranbarhate2118 Жыл бұрын
Where to find the interview question and answer notes
@QAFox
@QAFox Жыл бұрын
In the description of the videos.
@miral-mamun6145
@miral-mamun6145 Жыл бұрын
FluentWait allows to set polling interval while WebDriverWait does not. Fact - You can set in both after all WebDriverWait extends FluentWait and all configurable methods are public in FluentWait. We can not use conditions defined in class ExpectedConditions in FluentWait instance and override apply method in WebDriverWait instance. Fact - You can use any one in any instance. WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(30)); // Check for condition in every 2 seconds and overriding default interval 500 MS wait.pollingEvery(Duration.ofSeconds(2));
@revathikamaraj6650
@revathikamaraj6650 Жыл бұрын
These 2 lines are not working in selenium 4.11.0 WebDriverWait wait = new WebDriverWait(driver,Duration.ofSeconds(10)); FluentWait wait = new FluentWait(driver).withTimeout(Duration.ofSeconds(35)).pollingEvery(Duration.ofSeconds(10)); and also, wait.until(ExpectedConditions.visibilityOf(e)); Can anyone help me to handle this? Please
Seja Gentil com os Pequenos Animais 😿
00:20
Los Wagners
Рет қаралды 49 МЛН
Сюрприз для Златы на день рождения
00:10
Victoria Portfolio
Рет қаралды 2,4 МЛН
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 28 МЛН
P17 - Implicit Wait Timeout in Selenium WebDriver | తెలుగు |
20:48
Implicit Wait, Explicit Wait and Fluent Wait in Selenium
24:42
Magnetic Automation and Learnings
Рет қаралды 1,7 М.
What are GetWindowHandle and GetWindowHandles in Selenium? | Selenium Basics
12:42
P18 - Explicit Wait in Selenium WebDriver | తెలుగు |
44:36
H Y R Tutorials
Рет қаралды 33 М.
Seja Gentil com os Pequenos Animais 😿
00:20
Los Wagners
Рет қаралды 49 МЛН