in past, i posted for usage of Expected Conditions function. it that post, present the most frequently used function visibility_of_element_located(locator). Similarly, there are many function for expected conditions. These are:
alert_is_present
element_located_selection_state_to_be
element_located_to_be_selected
element_selection_state_to_be
element_to_be_clickable – it is Displayed and Enabled.
element_to_be_selected
frame_to_be_available_and_switch_to_it
invisibility_of_element_located
presence_of_all_elements_located
presence_of_element_located
staleness_of
text_to_be_present_in_element
text_to_be_present_in_element_value
title_contains
title_is
visibility_of
visibility_of_element_located
you can find detailed explanation and their source code in this link.
Among these function, especially two function is can confused you. presence_of_element_located() and visibility_of_element_located(). The difference is, visibility wait for present element in DOM and become visible. for ex, element is exist(present) but style is set to not display it will be failed. To pass, element should be present and in terms of style it should be visible.
presence_of_element_located() it doesn’t matter visible or not, check if element is exist(present) in DOM.