Here is some HTML code snippet:
<div class="top_message_container">
<div style="margin-left: 544.5px; top: -100px;" class="top_msg_div"> point deleted</div>
</div>
I need assistance in writing Selenium code using Java.
This is what I've tried so far:
WebElement webElement = driver.findElement(By.xpath(".//div[contains(.,'point deleted')]"));
String ActualMsg= webElement .getText();
System.out.println(ActualMsg);
Unfortunately, it is displaying as empty/null
.