Selenium For Beginners

Share this post

User's avatar
Selenium For Beginners
A test script should have at least 1 assertion
Assertions

A test script should have at least 1 assertion

Alex Siminiuc's avatar
Alex Siminiuc
Apr 28, 2023
∙ Paid

Share this post

User's avatar
Selenium For Beginners
A test script should have at least 1 assertion
Share

If your test script does not have any assertions,

@Test
public void canNavigateToOtherPagesTest() {

   HomePage homePage = new HomePage(driver);
   homePage.open();

   ResultsPage resultsPage = homePage.searchBy(KEYWORD);

   resultsPage.goToPage(2);
   resultsPage.goToPage(3);
   resultsPage.goToPage(4);

}

then, you need to add at least one assertion to it.

Keep reading with a 7-day free trial

Subscribe to Selenium For Beginners to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Alex Siminiuc
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share