Search⌘ K

Execute Failing Tests in Command Prompt

Learn how to execute failing tests to generate screenshots, exception logs, and trace logs.

To make tests fail, we will modify the data-key attribute of the PAGINATION_TEXT_XPATH locator from the ResultsPage class by adding 1 to its value:

Java
By PAGINATION_TEXT_XPATH = By.xpath("//span[@data-key = 'pagination-text1']");

Run tests

Next, we run the ...