Selenium :After launching a website how could we check if the right page is launched
问题 In Selenium :After launching a website how could we check if the right page is launched or not. Example: If I want to launch www.google.com ,after running the code how do I check if the same page has been launched. I used, Assert.assertEquals("Correct web page",driver.findElement(By.Xpath("<xpath of one of the element in the page>")).isDisplayed ()); After running the program, I got the below error: Exception in thread "main" java.lang.AssertionError: expected:<Correct web page> but was:<true