Categories

1 Answer

Aug 20, 2019
WebElement el = driver.findElement(By.id(“ElementID”))

//get test from element and stored in text variable

String text = el.getText();

//assert text from expected

Assert.assertEquals(“Element Text”, text);
Click here to read more about Selenium
Click here to read more about Insurance

Related questions

Madanswer
Aug 19, 2019 in Selenium
Aug 19, 2019 in Selenium
Aug 19, 2019 in Selenium
...