I have a login page. If the login fails then an error message is displayed, otherwise the user is taken into the website.
I wanted to try an If else statement, and check if the error message is visible and if not then assume success and continue into the website.
However, if the login is successful, the error message label is not visible (and does not exist in the html code) and therefore the test fails with an unable to locate element error.
Unable to locate element. Details: Attempting to find [Html] element using Find logic (Html): [id 'Exact' ctl00_ContentPlaceHolder1_lblmessage] AND [tagname 'Exact' span]