Skip to content

Commit

Permalink
Merge pull request #4078 from Ginger-Automation/BugFix/43044-Certific…
Browse files Browse the repository at this point in the history
…ateIssueWithPlaywright

BugFix - 43044 - Certificate Error With Playwright
  • Loading branch information
Maheshkale447 authored Feb 5, 2025
2 parents 2234fdd + d2b4596 commit 46799e7
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,18 @@ private async Task HandleGotoUrlOperationAsync()
{
await _browser.NewWindowAsync(setAsCurrent: true);
}
await _browser.CurrentWindow.CurrentTab.GoToURLAsync(url);
try
{
await _browser.CurrentWindow.CurrentTab.GoToURLAsync(url);
}
catch (Exception ex)
{
//this error message is faced when a HTTPS website has certificate issues and browser shows 'Your connection is not private' message
if (!ex.Message.Contains("net::ERR_CERT_COMMON_NAME_INVALID"))
{
throw;
}
}
}

private string GetTargetUrl()
Expand Down

0 comments on commit 46799e7

Please sign in to comment.