由于网页上的网址没有xpath和id,我该如何检查我的实际网址是否与预期的网址匹配?
我在下面提供了我的代码,但它没有用.
String Actualtext = driver.findElement(By.linkText("http://localhost:8080/imdb/homepage")).getText();
Assert.assertEquals(Actualtext, "http://localhost:8080/imdb/homepage" );
System.out.println("URL matching --> Part executed");
Run Code Online (Sandbox Code Playgroud)