Synchronization makes selenium to wait for specific elements before performing operation on them. We can use below synchronization methods in selenium.
We can set the default page navigation timeout. Below statement will set the navigation timeout as 50. This means that selenium script will wait for maximum 50 seconds for page to load. If page does not load within 50 seconds, it will throw an exception.
We can set the default element existance timeout. Below statement will set the default object synchronization timeout as 20. This means that selenium script will wait for maximum 20 seconds for element to exist. If Web element does not exist within 20 seconds, it will throw an exception.
We can also insert custom synchronization points in the script using WebDriverWait class. Please remember that you have to import this class before you use it.
from selenium.webdriver.support import expected_conditions as EC
We can also instruct selenium to wait until element is in expected condition.
What do you think on above selenium topic. Please provide your inputs and comments. You can write to me at firstname.lastname@example.org