When I tried to get text of particular element which is returning all small letters. Hence my assertion has failed. kindly help me to get actual innertext and please let me know is there any other methods available to validate case sensitive inner text.
Error:
java.lang.AssertionError: expected [All content one platform] but found [all content one platform]
Code:
@FindBy(xpath ="//*[@class='promo__info']/h2")
WebElement AllContent;
String contentText = AllContent.getText();
System.out.println("***********************" + contentText);
Assert.assertEquals(contentText,"All content one platform");
Html:
<h2 data-v-31d5644f="">
All content one platform
</h2>
getText
actually returnes what is rendered rather than what's in the sources.