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?
@QAFox2 жыл бұрын
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 Жыл бұрын
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.
@shankarprasad24543 жыл бұрын
Excellent simple and precise!
@QAFox3 жыл бұрын
Thank you :)
@reshmapn79413 жыл бұрын
It's very clear and concise explanation sir Thank you
@QAFox3 жыл бұрын
Welcome Reshma :)
@pujasaha54522 жыл бұрын
Best explanation ..great work 👌
@QAFox2 жыл бұрын
Thank you :)
@swapnil38352 жыл бұрын
Explanation is awesome ... Thank u sir
@QAFox2 жыл бұрын
Welcome :)
@anygamer27922 жыл бұрын
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?
@sasireka79742 жыл бұрын
Sir,mostly in our project which wait is used fluent or explicit
@QAFox2 жыл бұрын
Explicit WebDriverWait is used in projects.
@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.
@udayshankar3852 жыл бұрын
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 .
@QAFox2 жыл бұрын
Earlier while recording the video, I didn't know that. But later I got to know. Will create a video on this soon.
@udayshankar3852 жыл бұрын
@@QAFox Thank you!
@QAFox2 жыл бұрын
@@udayshankar385 Welcome :)
@kiranbarhate2118 Жыл бұрын
Where to find the interview question and answer notes
@QAFox Жыл бұрын
In the description of the videos.
@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 Жыл бұрын
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