File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ using System ;
2
+ using System . Collections . Generic ;
3
+ using System . Linq ;
4
+ using System . Text ;
5
+ using System . Threading . Tasks ;
6
+ using CefSharp . OffScreen ;
7
+ using Xunit ;
8
+ using Xunit . Abstractions ;
9
+
10
+ namespace CefSharp . Test . Issues
11
+ {
12
+ //NOTE: All Test classes must be part of this collection as it manages the Cef Initialize/Shutdown lifecycle
13
+ [ Collection ( CefSharpFixtureCollection . Key ) ]
14
+ public class Issue4621
15
+ {
16
+ private readonly ITestOutputHelper output ;
17
+
18
+ public Issue4621 ( ITestOutputHelper output )
19
+ {
20
+ this . output = output ;
21
+ }
22
+
23
+ [ Fact ( Skip = "Issue https://github.com/cefsharp/CefSharp/issues/4621" ) ]
24
+ public async Task GoogleSearchToGoogleAccountsBreaksJS ( )
25
+ {
26
+ using ( var browser = new ChromiumWebBrowser ( "https://www.google.com" , useLegacyRenderHandler : false ) )
27
+ {
28
+ var initialResponse = await browser . WaitForInitialLoadAsync ( ) ;
29
+
30
+ var response = await browser . LoadUrlAsync ( "https://accounts.google.com/" ) ;
31
+ var mainFrame = browser . GetMainFrame ( ) ;
32
+
33
+ Assert . True ( response . Success ) ;
34
+ Assert . True ( mainFrame . IsValid ) ;
35
+ Assert . Contains ( "accounts.google" , mainFrame . Url ) ;
36
+ Assert . Equal ( 200 , response . HttpStatusCode ) ;
37
+
38
+ output . WriteLine ( "Url {0}" , mainFrame . Url ) ;
39
+
40
+ var buttonText = await mainFrame . EvaluateScriptAsync < string > ( "(function() { return document.querySelector(\" button[aria-haspopup='menu']\" ).innerText; })();" ) ;
41
+ Assert . Equal ( "Create account" , buttonText ) ;
42
+ }
43
+ }
44
+ }
45
+ }
You can’t perform that action at this time.
0 commit comments