How to check webpage element exist or not using xpath?

I have one web page which contain login page and home page.

I used web element with xpath to login and redirect to home page. its working fine. But when I’m already logged in and run this automation script its give me error from my login process because its directly redirect me to home page.

I want to check Xpath element is exist on current webpage or not.

Please help me…

1 Like

I also have the same query,

I tried this solution:
Use wait for image and store value to a boolean variable.
Use If condition on that same variable.

This works sometimes only and isn’t a reliable solution.

@karan_dave @vishal_bareja you can put the log in actions in the Exception Handling “Try to complete” block. It the bot doesn’t manage to do these actions it will skip them and go to other actions - the recording will not fail.

1 Like

Issue Resolved

1 Like