first commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
const {_android: android} = require('playwright');
|
||||
|
||||
const RDV_URL = "https://rendezvousparis.hermes.com/client/register";
|
||||
// const RDV_URL = "https://bot.sannysoft.com/";
|
||||
|
||||
|
||||
(async () => {
|
||||
// Connect to the device.
|
||||
const [device] = await android.devices();
|
||||
console.log(`Model: ${device.model()}`);
|
||||
console.log(`Serial: ${device.serial()}`);
|
||||
// Take screenshot of the whole device.
|
||||
await device.screenshot({path: 'device.png'});
|
||||
|
||||
{
|
||||
// --------------------- Browser -----------------------
|
||||
|
||||
// Launch Chrome browser.
|
||||
await device.shell('am force-stop com.android.chrome');
|
||||
const context = await device.launchBrowser({command: '--incognito'});
|
||||
|
||||
// Use BrowserContext as usual.
|
||||
const page = await context.newPage();
|
||||
await page.goto(RDV_URL);
|
||||
console.log(await page.evaluate(() => window.location.href));
|
||||
await page.screenshot({path: 'page.png'});
|
||||
await delay(50000);
|
||||
await context.close();
|
||||
}
|
||||
|
||||
// Close the device.
|
||||
await device.close();
|
||||
})();
|
||||
Reference in New Issue
Block a user