Hi all,
I am using LoggingSelenium with TestNG to log and test our website application.
I have a common method to check after each navigation to see if we have ended up on an error page.
This checks to see if text at //div/h1 is Error.
Now some pages do not have this element, resulting in the SeleniumLogging reporting an error.
Is there anyway I can check to see if element is present without logging in output, as this is not an error.
Many thanks, for your help.
Mark
hi Mark,
Yes you can !!! parse the html page. use parser like html_paser / Jericho etc…. hope it can help you
Erezso
Log in to post a comment.
Hi all,
I am using LoggingSelenium with TestNG to log and test our website application.
I have a common method to check after each navigation to see if we have ended up on an error page.
This checks to see if text at //div/h1 is Error.
Now some pages do not have this element, resulting in the SeleniumLogging reporting an error.
Is there anyway I can check to see if element is present without logging in output, as this is not an error.
Many thanks, for your help.
Mark
hi Mark,
Yes you can !!!
parse the html page.
use parser like html_paser / Jericho etc….
hope it can help you
Erezso