All the before and after code is getting executed but not this try block. Please help:
try
{
if (driver.findElement(By.xpath("//*[@id='00N300000052VEX']")).getText().contains("Block"))
{
driver.findElement(By.xpath("//*[@id='00N300000052VEX']")).clear();
driver.findElement(By.xpath("//*[@id='00N300000052VEX']")).sendKeys("Accept");
}
else if (driver.findElement(By.xpath("//*[@id='00N300000052VEX']")).getText().contains("Accept"))
{
driver.findElement(By.xpath("//*[@id='00N300000052VEX']")).clear();
driver.findElement(By.xpath("//*[@id='00N300000052VEX']")).sendKeys("Review");
}
else if (driver.findElement(By.xpath("//*[@id='00N300000052VEX']")).getText().contains("Review"))
{
driver.findElement(By.xpath("//*[@id='00N300000052VEX']")).clear();
driver.findElement(By.xpath("//*[@id='00N300000052VEX']")).sendKeys("Block");
}
}
finally
{
Util.printInfo("Saving the Account");
homePage.click("SaveAccount");
}
}