How to check if Element exists in Selenium

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

This worked perfectly, thanks. For future viewers, make sure you use FindElements, not FindElement. (note the plural). This means you can then perform a count and wont throw exception if it can't find any

bradchellingworth
Автор

hi how can i use with xpath ? because ı dont have object id and if i can write this !=0) the systems say "object is not callable" please help me

TheEmirock
Автор

Step-2- Verify "Learn More..." link exists(There were two learn more links we have to identify liks in particular section.)
Step-3- If 1st "Learn More... " link does not exist still continue execution to next step.
Step-4- If 2nd link does not exist stop the execution 
Step-5- If second link exist click on link & verify the header of next page.

divyakumar