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

feat(cli): launch-server command #5713

Merged
merged 2 commits into from
Mar 4, 2021
Merged

Conversation

yury-s
Copy link
Member

@yury-s yury-s commented Mar 4, 2021

Simple command to run browserType.launchServer

@@ -53,6 +55,12 @@ export function runServer() {
new PlaywrightDispatcher(dispatcherConnection.rootDispatcher(), playwright);
}

export async function launchBrowserServer(browserName: string) {
const browserType = (playwright as any)[browserName] as BrowserType;
const server = await browserType.launchServer();
Copy link
Member

Choose a reason for hiding this comment

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

This looks good, but i would fs.readFileSync(config) and pass it here. That way user can opt into accepting downloads, respecting proxy, etc.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@yury-s yury-s force-pushed the launch-server-cli branch from a145551 to 7aa4fcb Compare March 4, 2021 17:21
@yury-s yury-s merged commit 26b7db9 into microsoft:master Mar 4, 2021
@yury-s yury-s deleted the launch-server-cli branch March 4, 2021 18:32
yury-s added a commit to yury-s/playwright that referenced this pull request Mar 4, 2021
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.

2 participants