File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Threading . Tasks ;
3+ using Xunit ;
4+
5+ namespace PuppeteerSharp . Tests . Page
6+ {
7+ [ Collection ( "PuppeteerLoaderFixture collection" ) ]
8+ public class UrlTests : PuppeteerBaseTest
9+ {
10+ [ Fact ]
11+ public async Task ShouldWork ( )
12+ {
13+ using ( var page = await Browser . NewPageAsync ( ) )
14+ {
15+ Assert . Equal ( TestConstants . AboutBlank , page . Url ) ;
16+ await page . GoToAsync ( TestConstants . EmptyPage ) ;
17+ Assert . Equal ( TestConstants . EmptyPage , page . Url ) ;
18+ }
19+ }
20+ }
21+ }
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ public static class TestConstants
88 public const string ServerUrl = "http://localhost:8907" ;
99 public const string HttpsPrefix = "https://localhost:8908" ;
1010 public const int ChromiumRevision = Downloader . DefaultRevision ;
11+ public const string AboutBlank = "about:blank" ;
1112 public static readonly string EmptyPage = $ "{ ServerUrl } /empty.html";
1213
1314 public static LaunchOptions DefaultBrowserOptions ( ) => new LaunchOptions
You can’t perform that action at this time.
0 commit comments