URL - https://www.etmoney.com/tools-and-calculators/ppf-calculator
pre-requisite - deposit amount ₹10,000
//Task 1: Verify if the Year end Balance of the last row is matching with the maturity amount approximately.
#Year end Balance of the last row
for(int r=1;r<noOfRows.size()+1;r++) {
String data = driver.findElement(By.xpath("//table[@id='ppfTable']/tbody/tr["+r+"]/td[4]")).getText();
String data1 = data.split("₹")[1];
System.out.println(data1.replaceAll(",", ""));
}
#maturity amount
wait = new WebDriverWait(driver,Duration.ofSeconds(10));
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//span[normalize-space()='2.71 Lacs']")));
WebElement maturityAmount1 = driver.findElement(By.xpath("//span[@id='maturityAmount']/span"));
System.out.println(maturityAmount1.getText());
My question is that how do I match Year end Balance of the last row(271214) and maturity amount(2.71 Lacs)
If I had to make an assertion based on above values how do I achieve it.
//Task 2: Verify if the table is populated with 20 rows and the year end balance of last row is matching with the maturity amount approximately.
Same as above stated Year end Balance of the last row(4,43,886) maturity amount(4.44 Lacs) use assertion.