I have selenium Test case to validate contents of 2 web pages. The issue, I am facing is I'm not able to get anything from element.getText()
.
I'm using below code.
driver1.get("https://some url");
String b = driver1.findElement(By.className("supArticleContent")).getText();
WebDriver driver2 = new ChromeDriver();
driver2.get("https://some other url");
String a = driver2.findElement(By.className("supArticleContent")).getText();
System.out.println("text content is"+a);
if (a.equals(b)) {
System.out.println("TC PASSED");
}
else{
System.out.println("TC FAILED");
}
supArticleContent
?.getText()
with .getAttribute("value")
but I can't tell because of a lot of missing information.