Skip to content

Commit

Permalink
Split browser and browser context (#2572)
Browse files Browse the repository at this point in the history
* Split browser and browser context

* Docs changes

* Move connection

* Fix CDPSession

* more fixes

* some fixes

---------

Co-authored-by: GitHub Action <action@github.com>
  • Loading branch information
kblok and actions-user authored Mar 28, 2024
1 parent dd4e9b9 commit c354cd4
Show file tree
Hide file tree
Showing 18 changed files with 570 additions and 414 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using NUnit.Framework;
using PuppeteerSharp.Cdp;
using PuppeteerSharp.Helpers;
using PuppeteerSharp.Nunit;

Expand All @@ -25,7 +26,7 @@ public TargetManagerTests() : base()
[Test, Retry(2), PuppeteerTest("TargetManager.spec", "TargetManager", "should handle targets")]
public async Task ShouldHandleTargets()
{
var targetManager = (Browser as Browser).TargetManager;
var targetManager = (Browser as CdpBrowser)!.TargetManager;
Assert.AreEqual(2, targetManager.GetAvailableTargets().Values.Count);

Assert.IsEmpty(await Context.PagesAsync());
Expand Down
Loading

0 comments on commit c354cd4

Please sign in to comment.