Skip to content

Commit

Permalink
inner try-catch added
Browse files Browse the repository at this point in the history
  • Loading branch information
pmahend1 committed Sep 24, 2020
1 parent 6f99e46 commit ca99a0a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .Net Core/MSRewards/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,17 @@ private async Task Login(IWebDriver driverlocal, WebDriverWait localwait)
catch (Exception ex)
{
Debug.WriteLine(ex.Message);
var yesButton = localwait.Until(d => d.FindElement(By.Id(Constants.IdSIButton9)));
try
{
var yesButton = localwait.Until(d => d.FindElement(By.Id(Constants.IdSIButton9)));
yesButton?.Click();
}
catch (Exception ex2)
{

Debug.WriteLine(ex2.Message);
}

yesButton?.Click();
}

await Task.Delay(3000);
Expand Down

0 comments on commit ca99a0a

Please sign in to comment.