Wait in Selenium
In this video I have Explained the Wait in Selenium:
If you have a previous WebUI automation experience, I'm sure you would have come across a situation where your test script could not find an element on the webpage as web page is still loading.
This may be happen due to following reasons:
1) due to very slow internet speed.
2) when the application server or web server is serving the page too slowly due to resource constraints
3) the element on the webpage is not loaded by the time your test script tries to find it.
So at this situation you have to calculate and configure the average wait time. Your test scripts should wait for WebElements to load on the webpage.
To understand this let us take an example: Let us consider that you are on a web Page and you click on the country and select the country. Then according to the Country all States will be loaded in State Section and when you select a particular State then according to State District change automatically changed on webpage. Its means that you are on the same webpage. There is no navigation to next page .This work is done by Ajax. Ajax send the request from page background to change the State and District.So web page automatically refreshed by Ajax,so it will take time and this time will be wait time.. In simple words we have to hold our WebDriver untill Ajax Complete its action.
To resolve the above situation WebDriver provides a very handy feature to manage wait time.
what is wait Time : Wait time is the time your driver will wait for the WebElement to load before it gives up and throws NoSuchElementException. It means that if WebElement found in wait time then it is ok otherwise we will get NoSuchElementException.
Types of Wait in Selenium:
There are two ways by which you can make WebDriver wait for WebElement.
1) Implicit wait time
2) Explicit wait time
3) Fluent wait time
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Wait in Selenium», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.