In the below piece of code the else block is not getting executed
Only if the "IF" condition satisfies it will work perfectly fine
If the "IF" condition does not satisfy, it is directly going in to the catch block and failing the test case
Code: Select all
public bool smallSamplePopUp()
{
try
{
if(repo.Fusion.SaveSmallSampleClickOK.Visible)
{
repo.Fusion.SaveSmallSampleClickOK.Click("18;12");
Reports.Success("Click on OK Button to run less records file", "Successfully run the report");
}
else
{
}
return true;
}
catch
{
return false;
}
}
That's why I did not kept anything in the else block
Please help me to understand the issue
Regards