playwright
playwright copied to clipboard
[Question] Android automation with other browsers?
I noticed launchBrowser can accept a pkg
parameter. Is there any limitation that makes it impossible to use other chromium based browser such as Brave? For my use-case, the site in question blacklists traffic from the Chrome browser, but it will work from Brave. I suspect this is because Brave blocks whatever invasive fingerprinting is happening.
However, it doesn't seem to work when I tried. Here is the basic test script I am using.
const { _android: android } = require('playwright');
(async () => {
// Connect to the device.
const [device] = await android.devices();
console.log(`Model: ${device.model()}`);
console.log(`Serial: ${device.serial()}`);
await device.shell('am force-stop com.brave.browser');
const context = await device.launchBrowser({
pkg: 'com.brave.browser_beta',
});
const page = await context.newPage();
await page.goto('https://www.google.com', { waitUntil: 'networkidle' });
// Close the device.
await device.close();
})();
If Brave preserve Chromium command line options and CDP it should work. What error do you see?
We are currently not planning to invest into dedicated support for Brave. If you figure out how to launch it with playwright, please let us know, we can include it into our documentation so that others could benefit too.
Why was this issue closed?
Thank you for your involvement. This issue was closed due to limited engagement (upvotes/activity), lack of recent activity, and insufficient actionability. To maintain a manageable database, we prioritize issues based on these factors.
If you disagree with this closure, please open a new issue and reference this one. More support or clarity on its necessity may prompt a review. Your understanding and cooperation are appreciated.