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

fix(browserFetcher): support macos 10.13 for firefox and chromium #1549

Merged

Conversation

JoelEinbinder
Copy link
Contributor

I don't have a macos 10.13 build to test on, and we aren't set up to compile it for WebKit. However there is a good chance this will work for Chromium and Firefox.

I also improved the error message received when on an unsupported platform.

#1535

@JoelEinbinder
Copy link
Contributor Author

@roblav96 can you checkout this patch and see if it works for you on macos 10.13? I'm not set up to test it. Thanks!

@roblav96
Copy link

@JoelEinbinder @aslushnikov

Setup

I ended up writing a quick pack_all_packages.sh script that ran npm pack on all packages:

#!/usr/bin/env bash
npm run clean
cd "$HOME/Sandbox/playwright"; npm pack .
cd "$HOME/Sandbox/playwright/packages/playwright-firefox"; npm pack .
cd "$HOME/Sandbox/playwright/packages/playwright-chromium"; npm pack .
cd "$HOME/Sandbox/playwright/packages/playwright"; npm pack .

Then I installed the packed output tar files and node index.js the following test script:

process.nextTick(async () => {
	for (const browserType of ['chromium', 'firefox']) {
		const browser = await require(`playwright-${browserType}`)[browserType].launch()
		const context = await browser.newContext()
		const page = await context.newPage()
		await page.goto('http://whatsmyuseragent.org/')
		await page.screenshot({ path: `example-${browserType}.png` })
		await browser.close()
	}
})

Results

example-chromium

example-firefox

✅ Success

Copy link
Collaborator

@aslushnikov aslushnikov left a comment

Choose a reason for hiding this comment

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

Looks like it does work!

@aslushnikov
Copy link
Collaborator

Thank you @roblav96 for testing this! Merging in then.

@aslushnikov aslushnikov merged commit 31f186c into microsoft:master Mar 30, 2020
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.

None yet

3 participants