Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate to server side connect #1908

Merged
merged 3 commits into from Jan 14, 2022

Conversation

mxschmitt
Copy link
Member

@mxschmitt mxschmitt commented Dec 29, 2021

Fixes #986

src/Playwright/Core/Artifact.cs Outdated Show resolved Hide resolved
src/Playwright/Core/Page.cs Outdated Show resolved Hide resolved
src/Playwright/Core/Stream.cs Outdated Show resolved Hide resolved
src/Playwright/Core/Video.cs Outdated Show resolved Hide resolved
src/Playwright/Core/Waiter.cs Outdated Show resolved Hide resolved
src/Playwright/Core/Waiter.cs Show resolved Hide resolved
src/Playwright/Transport/Connection.cs Outdated Show resolved Hide resolved
@mxschmitt mxschmitt force-pushed the feature/connect branch 2 times, most recently from 5b08ef0 to 460b013 Compare January 6, 2022 19:13
@mxschmitt mxschmitt force-pushed the feature/connect branch 2 times, most recently from 24a54a8 to 11d3b8c Compare January 6, 2022 20:17
@mxschmitt mxschmitt marked this pull request as ready for review January 6, 2022 20:17
@mxschmitt mxschmitt force-pushed the feature/connect branch 2 times, most recently from c9a0533 to dab8db0 Compare January 7, 2022 22:56
src/Playwright/Core/Artifact.cs Show resolved Hide resolved
src/Playwright/Core/Artifact.cs Show resolved Hide resolved
src/Playwright/Core/BrowserType.cs Outdated Show resolved Hide resolved
src/Playwright/Core/BrowserType.cs Outdated Show resolved Hide resolved
src/Playwright/Core/BrowserType.cs Outdated Show resolved Hide resolved
}
browser = playwright.PreLaunchedBrowser;
browser.ShouldCloseConnectionOnClose = true;
browser.Disconnected += (_, _) => ClosePipe();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would hope that the line above takes care of this.

}
var task = CreateBrowserTask();
var timeout = options?.Timeout != null ? (int)options.Timeout : 30_000;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't technically need it, can be improved in a separate PR.

@@ -603,6 +598,10 @@ private Task WaitForURLAsync(string urlString, Regex urlRegex, Func<string, bool
private Waiter SetupNavigationWaiter(string @event, float? timeout)
{
var waiter = new Waiter((this.Page as Page)!.Channel, @event);
if (this.Page.IsClosed)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should refactor it (and in upstream) to only rely on the connection. I.e. don't hide the waitForEventInfo rejection.

src/Playwright/Helpers/TaskQueue.cs Show resolved Hide resolved
@mxschmitt mxschmitt merged commit fd80161 into microsoft:main Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Add BrowserType.connect()
3 participants