Screenshot:
we need to import to our class "Import org.openqa.selenium.TakesScreenshot;"
We can take screenshot when an error occurs to know where it happened the error, this help to identify the problem and fix it faster.
Control Exists
we can check if the control exist using WebElement.IsDisplay by placing the above code snippet in a try catch block.In this class we are using to test the control exist and the screenshot



No hay comentarios:
Publicar un comentario