Skip to content

Commit

Permalink
Test - Add additional test for issue #4771
Browse files Browse the repository at this point in the history
- They will only run locally for now

#4771
  • Loading branch information
amaitland committed May 6, 2024
1 parent 7af16b9 commit 527a062
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion CefSharp.Test/Issues/Issue4621.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public Issue4621(ITestOutputHelper output)
this.output = output;
}

[Fact(Skip = "Issue https://github.com/cefsharp/CefSharp/issues/4621")]
[SkipIfRunOnAppVeyorFact]
public async Task GoogleSearchToGoogleAccountsBreaksJS()
{
using (var browser = new ChromiumWebBrowser("https://www.google.com", useLegacyRenderHandler: false))
Expand All @@ -41,5 +41,23 @@ public async Task GoogleSearchToGoogleAccountsBreaksJS()
Assert.Equal("Create account", buttonText);
}
}

[SkipIfRunOnAppVeyorFact]
public async Task GoogleSearchToGmailBreaksJS()
{
using (var browser = new ChromiumWebBrowser("www.google.com", useLegacyRenderHandler: false))
{
var response = await browser.WaitForInitialLoadAsync();

var navResponse = await browser.LoadUrlAsync("https://mail.google.com/mail/&ogbl");
Assert.True(navResponse.Success);
Assert.Equal(200, navResponse.HttpStatusCode);

var mainFrame = browser.GetMainFrame();
Assert.True(mainFrame.IsValid);
var buttonText = await mainFrame.EvaluateScriptAsync<string>("(function() { return document.querySelector(\"a[data-action='sign in']\").innerText; })();");
Assert.Equal("Sign in", buttonText);
}
}
}
}

0 comments on commit 527a062

Please sign in to comment.