1

I would like to verify whether home page is displayed before executing other test cases on the website.

Assert.assertEquals(driver.getTitle(), “Title of webpage”, "Home page is not opened ");

However above assert is passed, when HTML is displayed as below. I would like to pass only when the actual website is loaded including all images. Please help me with it. enter image description here

Chris
  • 236
  • 4
  • 14

1 Answers1

1

The syntax is :

assertEquals(expected, actual)

use the following way:

assertEquals(expected title, driver.gettitle());
Ganesh
  • 11
  • 6
  • Hi @Ganesh - This assertion is passed when HTML is loaded in browser as shown in screenshot(Actual page is not loaded in browser, Please see screenshot). – Chris Mar 29 '19 at 13:24