{"id":16548,"date":"2016-05-04T08:00:27","date_gmt":"2016-05-04T12:00:27","guid":{"rendered":"https:\/\/simpleprogrammer.com\/?p=16548"},"modified":"2018-01-12T17:31:58","modified_gmt":"2018-01-12T22:31:58","slug":"selenium-webdriver-tutorial-master-synchronization","status":"publish","type":"post","link":"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/","title":{"rendered":"Selenium Tutorial"},"content":{"rendered":"<p><strong>Why is it important to have proper synchronization for your automated tests?<\/strong>\\n\\nHave you ever dealt with flaky automated checks? Checks that fail intermittently and you are unsure why? How about checks that fail in your Continuous Integration environment, but work locally?\\n\\nAll of these could be a result of improper synchronization within your tests. Synchronization refers to the idea that the speed of your automated check should coincide with the speed of the application under test (AUT). Basically, if the code of your automated check runs faster or slower than the actual AUT, you will experience all of the problems that I listed above.\\n\\nIf your code runs too fast, it will not find HTML elements on a page that you were expecting to be there. If your code runs too slow, you will be wasting valuable time during test execution. Either way, this destroys the reputation of your functional checks and deems them as \u201cflaky\u201d or \u201cslow\u201d. No automated check of yours should wear those scarlet letters.\\n\\nTherefore, proper synchronization techniques with automated functional GUI tests are extremely important for any Test Automation Engineer to know. This tutorial will take a very deep look at all of the timeouts and synchronization options available to you with Selenium Webdriver.\\n\\n<\/p>\n<h2 id='a-1'>Pre-requisites<\/h2>\n<p>\\n\\n<\/p>\n<hr>\n<p>\\n\\nI am making the assumption that you have or know the following:\\n\\n<\/p>\n<ol>\\n<\/p>\n<li>\\nSome flavor of Visual Studio installed\\n\\n-Although I will teach using C#, most of the concepts and ideas here can be applied to other bindings like Java, Ruby, and so on.\\n<\/li>\n<p>\\n<\/p>\n<li>General knowledge of C#<\/li>\n<p>\\n<\/p>\n<li>Basic understanding of <a href=\"http:\/\/courses.ultimateqa.com\/courses\/selenium-with-c?coupon=simpleprogrammerparallelpost\">Selenium Webdriver<\/a><\/li>\n<p>\\n<\/p>\n<li>Understanding of element locators using HTML<\/li>\n<p>\\n<\/ol>\n<p>\\n\\n<\/p>\n<h2 id='a-2'>What Application Will we Test?<\/h2>\n<p>\\n\\n<\/p>\n<hr>\n<p>\\n\\nThis is the <a href=\"https:\/\/the-internet.herokuapp.com\/dynamic_loading\/1\" target='blank_'>AUT<\/a> that we will be working with today. A Selenium guru by the name of Dave Haeffner uses this application to teach Selenium Webdriver. The goal of the test is really simple:\\n\\n<\/p>\n<ol>\\n    <\/p>\n<li>Navigate to the page<\/li>\n<p>\\n    <\/p>\n<li>Click button with id = \u201cstart\u201d<\/li>\n<p>\\n    <\/p>\n<li>Make sure that element with id = \u201cfinish\u201d is present on the page<\/li>\n<p>\\n<\/ol>\n<p>\\n\\n<\/p>\n<h2 id='a-3'>Improper Synchronization Example<\/h2>\n<p>\\n\\n<\/p>\n<hr>\n<p>\\n\\nI wrote a <a href=\"https:\/\/github.com\/nadvolod\/WebdriverTimeoutsTutorial\" target='blank_'>quick test<\/a> to give you an example of what can happen when your synchronization strategy isn\u2019t up to par. Take a look at this code:\\nIf you try to run the test in your Visual Studio, you will probably receive a similar message like in the image below.\\n\\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-16550\" src=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2016\/05\/selenium.png\" alt=\"selenium\" width=\"694\" height=\"235\" \/>\\n\\nSo why did this test fail? Take a moment to think about it and walk through the application or <a href=\"https:\/\/github.com\/nadvolod\/WebdriverTimeoutsTutorial\" target='blank_'>step through the code<\/a>.\\n\\nThe automated check failed because of improper synchronization. After pressing the \u201cstart button\u201d, there is a loading screen that we must wait for 5 seconds. However, in our automated check, we don\u2019t have such a synchronization point. Therefore, when our test executes the line of code below, the Webdriver API comes back within 500ms and says that this element is not visible. Of course, it\u2019s not visible, there is a stupid loading icon that we didn\u2019t account for:\\n\\nTo resolve synchronization problems, I will teach you 3 types of techniques to apply to your tests.\\n\\n<\/p>\n<h2 id='a-4'>What is an <strong>IMPLICIT<\/strong> Wait in Selenium Webdriver?<\/h2>\n<p>\\n\\n<\/p>\n<hr>\n<p>\\n\\nAn <strong>implicit wait<\/strong> in Selenium came from Watir\u2019s implicit wait idea. Here we are telling the Webdriver to poll the DOM for a specific amount of time when trying to find an element or elements. The default setting is 0 seconds. Once set, the timeout is set for the life of the driver, until it is changed again.\\n\\n(<a href=\"http:\/\/www.seleniumhq.org\/docs\/04_webdriver_advanced.jsp#implicit-waits\" target='blank_'>Selenium HQ<\/a>)\\n\\n<\/p>\n<h5>How do you use an Implicit Wait?<\/h5>\n<p>\\n\\nOnce you create a type of driver, you will have access to the ImplicitlyWait() method. This method takes a TimeSpan object which you can use to specify the maximum of time that you want the driver to wait before throwing a <strong>NoSuchElementException<\/strong>.\\n\\n<\/p>\n<h5>What are the Advantages and Disadvantages of Implicit Waits?<\/h5>\n<p>\\n\\n<strong>Advantages<\/strong>\\n\\n<\/p>\n<ul>\\n    <\/p>\n<li>It\u2019s really easy and quick to create these type of synchronizations<\/li>\n<p>\\n<\/ul>\n<p>\\n\\n<strong>Disadvantages<\/strong>\\n\\n<\/p>\n<ul>\\n    <\/p>\n<li>The timeout lasts for the life of the driver. There are instances where you want your automated checks to fail right away when they cannot find an element. Therefore, you will need to reset the wait during that time and remember to set it back to the original value after you are done because the rest of the tests will now use the new value<\/li>\n<p>\\n    <\/p>\n<li>Tests can be flakier or run longer as a result<\/li>\n<p>\\n<\/ul>\n<p>\\n\\n<\/p>\n<h5>What Exception is Thrown by an Implicit Wait?<\/h5>\n<p>\\n\\nOpenQA.Selenium.NoSuchElementException\\n\\n<\/p>\n<h2 id='a-6'>What is an <strong>EXPLICIT<\/strong> Wait in Selenium Webdriver?<\/h2>\n<p>\\n\\n<\/p>\n<hr>\n<p>\\n\\nAn <strong>explicit wait<\/strong> is code you define to wait for a certain condition to occur before proceeding further in the code. The worst case of this is Thread.Sleep(), which sets the condition to an exact time period to wait. There are some convenience methods provided that help you write code that will wait only as long as required. WebDriverWait in combination with ExpectedCondition is one way this can be accomplished. (<a href=\"http:\/\/www.seleniumhq.org\/docs\/04_webdriver_advanced.jsp#implicit-waits\" target='blank_'>Selenium HQ<\/a>)\\n\\n<\/p>\n<h5>How do you use an Explicit Wait?<\/h5>\n<p>\\n\\n<strong>ExpectedConditions<\/strong>\\n\\nThese are a set of common conditions that can be used with the WebDriverWait class to check on the state of an object.\\n\\nSome of the most common ones include:\\n\\n<\/p>\n<table>\\n<\/p>\n<tbody>\\n<\/p>\n<tr>\\n<\/p>\n<td><b>Name<\/b><\/td>\n<p>\\n<\/p>\n<td><b>Description<\/b><\/td>\n<p>\\n<\/tr>\n<p>\\n<\/p>\n<tr>\\n<\/p>\n<td><span style=\"font-weight: 400;\">ElementExists<\/span><\/td>\n<p>\\n<\/p>\n<td><span style=\"font-weight: 400;\">An expectation for checking that an element is present on the DOM of a page. This does not necessarily mean that the element is visible.<\/span><\/td>\n<p>\\n<\/tr>\n<p>\\n<\/p>\n<tr>\\n<\/p>\n<td><span style=\"font-weight: 400;\">ElementIsVisible<\/span><\/td>\n<p>\\n<\/p>\n<td><span style=\"font-weight: 400;\">An expectation for checking that an element is present on the DOM of a page and visible. Visibility means that the element is not only displayed but also has a height and width that is greater than 0.<\/span><\/td>\n<p>\\n<\/tr>\n<p>\\n<\/p>\n<tr>\\n<\/p>\n<td><a href=\"https:\/\/seleniumhq.github.io\/selenium\/docs\/api\/dotnet\/html\/M_OpenQA_Selenium_Support_UI_ExpectedConditions_FrameToBeAvailableAndSwitchToIt_1.htm\" target='blank_'><span style=\"font-weight: 400;\">FrameToBeAvailableAndSwitchToIt(String)<\/span><\/a><\/td>\n<p>\\n<\/p>\n<td><span style=\"font-weight: 400;\">An expectation for checking whether the given frame is available to switch to. If the frame is available it switches the given driver to the specified frame.<\/span><\/td>\n<p>\\n<\/tr>\n<p>\\n<\/p>\n<tr>\\n<\/p>\n<td><a href=\"https:\/\/seleniumhq.github.io\/selenium\/docs\/api\/dotnet\/html\/M_OpenQA_Selenium_Support_UI_ExpectedConditions_TextToBePresentInElement.htm\" target='blank_'><span style=\"font-weight: 400;\">TextToBePresentInElement<\/span><\/a><\/td>\n<p>\\n<\/p>\n<td><span style=\"font-weight: 400;\">An expectation for checking if the given text is present in the specified element.<\/span><\/td>\n<p>\\n<\/tr>\n<p>\\n<\/p>\n<tr>\\n<\/p>\n<td><a href=\"https:\/\/seleniumhq.github.io\/selenium\/docs\/api\/dotnet\/html\/M_OpenQA_Selenium_Support_UI_ExpectedConditions_UrlContains.htm\" target='blank_'><span style=\"font-weight: 400;\">UrlContains<\/span><\/a><\/td>\n<p>\\n<\/p>\n<td><span style=\"font-weight: 400;\">An expectation for the URL of the current page to be a specific URL.<\/span><\/td>\n<p>\\n<\/tr>\n<p>\\n<\/tbody>\n<p>\\n<\/table>\n<p>\\n\\nA full list of all the ExpectedConditions <a href=\"https:\/\/seleniumhq.github.io\/selenium\/docs\/api\/dotnet\/html\/T_OpenQA_Selenium_Support_UI_ExpectedConditions.htm\" target='blank_'>can be found here<\/a>.\\n\\n<\/p>\n<h5>What are the Advantages and Disadvantages of Explicit Waits?<\/h5>\n<p>\\n\\n<strong>Advantages<\/strong>\\n\\n<\/p>\n<ul>\\n    <\/p>\n<li>The explicit wait is dynamic and great for locating elements in between transition points. It will wait the maximum amount of time specified, but only if necessary<\/li>\n<p>\\n    <\/p>\n<li>Selenium Webdriver provides built in ExpectedConditions class out of the box so that we can check our web applications for different conditions with 1 or 2 lines of code<\/li>\n<p>\\n<\/ul>\n<p>\\n\\n<strong>Disadvantages<\/strong>\\n\\n<\/p>\n<ul>\\n    <\/p>\n<li>A larger barrier to entry exists as compared to implicit waits because we need to learn all the different ways that we can apply an explicit wait<\/li>\n<p>\\n    <\/p>\n<li>If using Thread.Sleep(), this can make our functional tests really brittle and slow<\/li>\n<p>\\n<\/ul>\n<p>\\n\\n<\/p>\n<h3>What Exception is Thrown by an Explicit Wait?<\/h3>\n<p>\\n\\nOpenQA.Selenium.NoSuchElementException\\n\\n<\/p>\n<h2 id='a-7'>Don\u2019t mix Your Implicit and Explicit Waits<\/h2>\n<p>\\n\\n<\/p>\n<hr>\n<p>\\n\\nA word of caution is to make sure that you do not mix implicit and explicit waits. The main problem is that implicit waits may be baked into the different components that are utilized by Selenium Webdriver, all the executables like ChromeDriver.exe, IEDriverServer.exe and so on. Therefore, when you are making multiple hops between the different implicit waits, you can stray into \u201cundefined behavior\u201d (<a href=\"http:\/\/stackoverflow.com\/questions\/15164742\/combining-implicit-wait-and-explicit-wait-together-results-in-unexpected-wait-ti\/15174978#15174978\" target='blank_'>Jim Evans<\/a>).\\n\\nI strongly recommend that you just use the Explicit Waits.\\n\\n<a href=\"http:\/\/www.aptuz.com\/blog\/selenium-implicit-vs-explicit-waits\/\" target='blank_'>This post<\/a> does a good job of conveying the undefined behavior when mixing waits.\\n\\n<\/p>\n<h2 id='a-8'>DefaultWait<\/h2>\n<p>\\n\\n<\/p>\n<hr>\n<p>\\n\\nA Default Wait, also known as a Fluent Wait in Java is a type of wait that utilizes the DefaultWait class of the C# Webdriver bindings to set the synchronization timeouts. In Java, the WebDriverWait class inherits from the FluentWait class. However, in C#, the WebDriverWait class inherits from the DefaultWait class. Hence, the difference in nomenclature. Remember, the WebDriverWait class is the one that we use to construct our sexy explicit waits. Take a look at this snippet:\\n\\n<\/p>\n<h5>How do you use a DefaultWait?<\/h5>\n<p>\\n\\nThe DefaultWait class exposes all of the functionality to us to construct really controlled synchronization points. For example, we can set the polling interval, the exceptions to ignore, and even write our own custom message.\\n\\n<\/p>\n<h5>What are the Advantages and Disadvantages of DefaultWaits?<\/h5>\n<p>\\n\\n<strong>Advantages<\/strong>\\n\\n<\/p>\n<ul>\\n    <\/p>\n<li>Provides us a really fine tuned way of controlling everything about a Selenium Webdriver wait<\/li>\n<p>\\n<\/ul>\n<p>\\n\\n<strong>Disadvantages<\/strong>\\n\\n<\/p>\n<ul>\\n    <\/p>\n<li>You need to define your own Expected Conditions to be able to use these functions<\/li>\n<p>\\n    <\/p>\n<li>Too much code required to create a simple synchronization point<\/li>\n<p>\\n    <\/p>\n<li>Most of the functionality is already exposed through the 2 constructors that the WebDriverWait has<\/li>\n<p>\\n<\/ul>\n<p>\\n\\n<strong>Conclusions<\/strong>\\n\\nI created the table below to help you easily understand the difference between the three synchronization techniques that you can use to improve your test.\\n\\n<\/p>\n<table>\\n<\/p>\n<tbody>\\n<\/p>\n<tr>\\n<\/p>\n<td><b>Type of wait <\/b><\/td>\n<p>\\n<\/p>\n<td><b>Definition <\/b><\/td>\n<p>\\n<\/p>\n<td><b>Usage <\/b><\/td>\n<p>\\n<\/p>\n<td><b>Default Timeout(sec) <\/b><\/td>\n<p>\\n<\/tr>\n<p>\\n<\/p>\n<tr>\\n<\/p>\n<td><span style=\"font-weight: 400;\">Implicit <\/span><\/td>\n<p>\\n<\/p>\n<td><span style=\"font-weight: 400;\">Tell Webdriver to poll the DOM for a certain amount of time <\/span><\/td>\n<p>\\n<\/p>\n<td><a href=\"https:\/\/gist.github.com\/nadvolod\/92aa44d6b1516cb65d7def7af2429726\"><span style=\"font-weight: 400;\" target='blank_'>https:\/\/gist.github.com\/nadvolod\/92aa44d6b1516cb65d7def7af2429726<\/span><\/a><\/td>\n<p>\\n<\/p>\n<td><span style=\"font-weight: 400;\">0 <\/span><\/td>\n<p>\\n<\/tr>\n<p>\\n<\/p>\n<tr>\\n<\/p>\n<td><span style=\"font-weight: 400;\">Explicit Waits<\/span><\/td>\n<p>\\n<\/p>\n<td><span style=\"font-weight: 400;\">This is the code that you write to wait for a certain condition to occur before proceeding<\/span><\/td>\n<p>\\n<\/p>\n<td><span style=\"font-weight: 400;\">https:\/\/gist.github.com\/nadvolod\/b3a4f1c44f229a18037d48290df4994e<\/span><\/td>\n<p>\\n<\/p>\n<td><span style=\"font-weight: 400;\">.5<\/span><\/td>\n<p>\\n<\/tr>\n<p>\\n<\/p>\n<tr>\\n<\/p>\n<td><span style=\"font-weight: 400;\">Default Waits<\/span><\/td>\n<p>\\n<\/p>\n<td><span style=\"font-weight: 400;\">This class allows you to specify the polling interval, the message, exceptions to ignore and much more.<\/span><\/td>\n<p>\\n<\/p>\n<td><span style=\"font-weight: 400;\">https:\/\/gist.github.com\/nadvolod\/9249cd30ac71065da2d20242f3683ac0<\/span><\/td>\n<p>\\n<\/p>\n<td><span style=\"font-weight: 400;\">Depends on your implementation<\/span><\/td>\n<p>\\n<\/tr>\n<p>\\n<\/tbody>\n<p>\\n<\/table>\n<p>\\n\\nThe Selenium community recommends that you use Explicit Waits above all others because they provide the most benefit to your tests. However, using something like Thread.Sleep() is almost never acceptable. In my career, I have had only a handful of instances where I hardcoded my wait time. Rather, you should utilize WebDriverWait and ExpectedConditions for your explicit waits.\\n\\nThe DefaultWaits are nice to know, just to keep it in your back pocket. However, I have never had the need to use them. In fact, the most time that I spent with them was for this tutorial. In my opinion, the WebDriverWait class does an excellent job of exposing all of the relevant functionality to me without having to move up to the DefaultWait class. However, this does not mean that it won\u2019t work for you.\\n\\nMaybe you will find some awesome use for this class. If you do, let me know, I would love to learn how you use this class.\\n\\nFinally, don\u2019t forget that the entire goal of this tutorial is to make your automated checks more stable to deliver higher value to your employer. So, go and make your checks better. Until next time automation enthusiasts!\\n\\n<em>As you continue to learn more skills and concepts, do take a look at our Simple Programmer course: <a href=\"https:\/\/simpleprogrammer.com\/store\/products\/learn-anything-quickly\/\">10 Steps to Learn Anything Quickly.<\/a><\/em>\\n\\n<\/p>\n<h2>Extra Resources<\/h2>\n<p>\\n\\n<\/p>\n<hr>\n<p>\\n\\n<\/p>\n<ul>\\n    <\/p>\n<li><a href=\"http:\/\/courses.ultimateqa.com\/courses\/synchronization-techniques?coupon=simpleprogrammerparallelpost\" target='blank_'>Selenium Webdriver synchronization video tutorials<\/a><\/li>\n<p>\\n    <\/p>\n<li><a href=\"http:\/\/goo.gl\/w4bt8f\" target='blank_'>Selenium Webdriver Timeouts<\/a><\/li>\n<p>\\n    <\/p>\n<li><a href=\"https:\/\/goo.gl\/5dZtwh\" target='blank_'>Selenium Webdriver WebdriverWait class in C#<\/a><\/li>\n<p>\\n    <\/p>\n<li><a href=\"https:\/\/goo.gl\/O26UKE\" target='blank_'>Selenium Webdriver WebdriverWait class in Java<\/a><\/li>\n<p>\\n    <\/p>\n<li><a href=\"https:\/\/goo.gl\/O26UKE\" target='blank_'>Selenium Webdriver Explicit and Implicit waits<\/a><\/li>\n<p>\\n    <\/p>\n<li><a href=\"http:\/\/goo.gl\/fD2zqj\" target='blank_'>Selenium Frameworks by John Sonmez<\/a><\/li>\n<p>\\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Why is it important to have proper synchronization for your automated tests?\\n\\nHave you ever dealt with flaky automated checks? Checks that fail intermittently and you are unsure why? How about checks that fail in your Continuous Integration environment, but work locally?\\n\\nAll of these could be a result of improper synchronization within your tests. Synchronization refers&#8230;<\/p>\n","protected":false},"author":40,"featured_media":16557,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[44070,5603054,415,141605296,162229840,12],"tags":[],"class_list":["post-16548","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automation","category-github","category-guest-post","category-pluralsight-2","category-skills","category-testing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Selenium Tutorial - Synchronization<\/title>\n<meta name=\"description\" content=\"Have you ever dealt with flaky automated checks? Checks that fail intermittently and you are unsure why? This Selenium Tutorial will take a deep look at all of options available to you with Selenium Webdriver.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Selenium Tutorial - Synchronization\" \/>\n<meta property=\"og:description\" content=\"Have you ever dealt with flaky automated checks? Checks that fail intermittently and you are unsure why? This Selenium Tutorial will take a deep look at all of options available to you with Selenium Webdriver.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/\" \/>\n<meta property=\"og:site_name\" content=\"Simple Programmer\" \/>\n<meta property=\"article:published_time\" content=\"2016-05-04T12:00:27+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-01-12T22:31:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2016\/05\/Selenium-Webdriver-Master-Synchronization.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1280\" \/>\n\t<meta property=\"og:image:height\" content=\"720\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Antonio Cucciniello\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Antonio Cucciniello\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/selenium-webdriver-tutorial-master-synchronization\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/selenium-webdriver-tutorial-master-synchronization\\\/\"},\"author\":{\"name\":\"Antonio Cucciniello\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/efe2e182a2e0f4b10015f305da31fc52\"},\"headline\":\"Selenium Tutorial\",\"datePublished\":\"2016-05-04T12:00:27+00:00\",\"dateModified\":\"2018-01-12T22:31:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/selenium-webdriver-tutorial-master-synchronization\\\/\"},\"wordCount\":1953,\"commentCount\":5,\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/selenium-webdriver-tutorial-master-synchronization\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2016\\\/05\\\/Selenium-Webdriver-Master-Synchronization.png\",\"articleSection\":[\"Automation\",\"GitHub\",\"Guest Post\",\"Pluralsight\",\"Skills\",\"Testing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/selenium-webdriver-tutorial-master-synchronization\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/selenium-webdriver-tutorial-master-synchronization\\\/\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/selenium-webdriver-tutorial-master-synchronization\\\/\",\"name\":\"Selenium Tutorial - Synchronization\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/selenium-webdriver-tutorial-master-synchronization\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/selenium-webdriver-tutorial-master-synchronization\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2016\\\/05\\\/Selenium-Webdriver-Master-Synchronization.png\",\"datePublished\":\"2016-05-04T12:00:27+00:00\",\"dateModified\":\"2018-01-12T22:31:58+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/efe2e182a2e0f4b10015f305da31fc52\"},\"description\":\"Have you ever dealt with flaky automated checks? Checks that fail intermittently and you are unsure why? This Selenium Tutorial will take a deep look at all of options available to you with Selenium Webdriver.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/selenium-webdriver-tutorial-master-synchronization\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/simpleprogrammer.com\\\/selenium-webdriver-tutorial-master-synchronization\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/selenium-webdriver-tutorial-master-synchronization\\\/#primaryimage\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2016\\\/05\\\/Selenium-Webdriver-Master-Synchronization.png\",\"contentUrl\":\"https:\\\/\\\/simpleprogrammer.com\\\/wp-content\\\/uploads\\\/2016\\\/05\\\/Selenium-Webdriver-Master-Synchronization.png\",\"width\":1280,\"height\":720},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/selenium-webdriver-tutorial-master-synchronization\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/simpleprogrammer.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Selenium Tutorial\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#website\",\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/\",\"name\":\"Simple Programmer\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/simpleprogrammer.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/simpleprogrammer.com\\\/#\\\/schema\\\/person\\\/efe2e182a2e0f4b10015f305da31fc52\",\"name\":\"Antonio Cucciniello\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ec013d4cc89abd9206c7dd1941527cfcb2caf44787ac8bbd8163b681923792aa?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ec013d4cc89abd9206c7dd1941527cfcb2caf44787ac8bbd8163b681923792aa?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/ec013d4cc89abd9206c7dd1941527cfcb2caf44787ac8bbd8163b681923792aa?s=96&d=mm&r=g\",\"caption\":\"Antonio Cucciniello\"},\"url\":\"https:\\\/\\\/simpleprogrammer.com\\\/author\\\/antoniocucciniello\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Selenium Tutorial - Synchronization","description":"Have you ever dealt with flaky automated checks? Checks that fail intermittently and you are unsure why? This Selenium Tutorial will take a deep look at all of options available to you with Selenium Webdriver.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/","og_locale":"en_US","og_type":"article","og_title":"Selenium Tutorial - Synchronization","og_description":"Have you ever dealt with flaky automated checks? Checks that fail intermittently and you are unsure why? This Selenium Tutorial will take a deep look at all of options available to you with Selenium Webdriver.","og_url":"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/","og_site_name":"Simple Programmer","article_published_time":"2016-05-04T12:00:27+00:00","article_modified_time":"2018-01-12T22:31:58+00:00","og_image":[{"width":1280,"height":720,"url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2016\/05\/Selenium-Webdriver-Master-Synchronization.png","type":"image\/png"}],"author":"Antonio Cucciniello","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Antonio Cucciniello","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/#article","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/"},"author":{"name":"Antonio Cucciniello","@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/efe2e182a2e0f4b10015f305da31fc52"},"headline":"Selenium Tutorial","datePublished":"2016-05-04T12:00:27+00:00","dateModified":"2018-01-12T22:31:58+00:00","mainEntityOfPage":{"@id":"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/"},"wordCount":1953,"commentCount":5,"image":{"@id":"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2016\/05\/Selenium-Webdriver-Master-Synchronization.png","articleSection":["Automation","GitHub","Guest Post","Pluralsight","Skills","Testing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/","url":"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/","name":"Selenium Tutorial - Synchronization","isPartOf":{"@id":"https:\/\/simpleprogrammer.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/#primaryimage"},"image":{"@id":"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/#primaryimage"},"thumbnailUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2016\/05\/Selenium-Webdriver-Master-Synchronization.png","datePublished":"2016-05-04T12:00:27+00:00","dateModified":"2018-01-12T22:31:58+00:00","author":{"@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/efe2e182a2e0f4b10015f305da31fc52"},"description":"Have you ever dealt with flaky automated checks? Checks that fail intermittently and you are unsure why? This Selenium Tutorial will take a deep look at all of options available to you with Selenium Webdriver.","breadcrumb":{"@id":"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/#primaryimage","url":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2016\/05\/Selenium-Webdriver-Master-Synchronization.png","contentUrl":"https:\/\/simpleprogrammer.com\/wp-content\/uploads\/2016\/05\/Selenium-Webdriver-Master-Synchronization.png","width":1280,"height":720},{"@type":"BreadcrumbList","@id":"https:\/\/simpleprogrammer.com\/selenium-webdriver-tutorial-master-synchronization\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/simpleprogrammer.com\/"},{"@type":"ListItem","position":2,"name":"Selenium Tutorial"}]},{"@type":"WebSite","@id":"https:\/\/simpleprogrammer.com\/#website","url":"https:\/\/simpleprogrammer.com\/","name":"Simple Programmer","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/simpleprogrammer.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/simpleprogrammer.com\/#\/schema\/person\/efe2e182a2e0f4b10015f305da31fc52","name":"Antonio Cucciniello","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/ec013d4cc89abd9206c7dd1941527cfcb2caf44787ac8bbd8163b681923792aa?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/ec013d4cc89abd9206c7dd1941527cfcb2caf44787ac8bbd8163b681923792aa?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ec013d4cc89abd9206c7dd1941527cfcb2caf44787ac8bbd8163b681923792aa?s=96&d=mm&r=g","caption":"Antonio Cucciniello"},"url":"https:\/\/simpleprogrammer.com\/author\/antoniocucciniello\/"}]}},"_links":{"self":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts\/16548","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/comments?post=16548"}],"version-history":[{"count":0,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/posts\/16548\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/media\/16557"}],"wp:attachment":[{"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/media?parent=16548"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/categories?post=16548"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/simpleprogrammer.com\/wp-json\/wp\/v2\/tags?post=16548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}