What is the purpose of checking the presence of elements rather than visibility of element?
As a Quality Tester, I should be on visibility of elements.
Can anyone provide me some good examples?
What is the purpose of checking the presence of elements rather than visibility of element?
As a Quality Tester, I should be on visibility of elements.
Can anyone provide me some good examples?
As mentioned in the link given by sisanared it explains differences between each method nicely, in short checking present of element only check whether element exist in your html page regardless it visibility and enable flag.
Usually presence of element used when you put some element as hidden, and you need to make sure that element present before you start your test in a page. For example I usually ask developer to add isPageReady element which rendered as hidden to indicate the page and other javascript codes have been loaded successfully since in modern web sometimes it is not enough to only wait using selenium default wait for page load.
Visible element, is on the other hand will be visible to user, and you usually used for interaction, like type, click, etc.