first commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
adb shell pm clear com.android.chrome
|
||||||
|
adb shell am set-debug-app --persistent com.android.chrome
|
||||||
|
adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
|
||||||
|
adb shell settings put global http_proxy zproxy.lum-superproxy.io:22225
|
||||||
|
adb shell settings put global global_http_proxy_host zproxy.lum-superproxy.io
|
||||||
|
adb shell settings put global global_http_proxy_port 22225
|
||||||
|
adb shell settings put global global_http_proxy_username um-customer-c_daabba94-zone-residential
|
||||||
|
adb shell settings put global global_http_proxy_password 9dwmh54u3bbh
|
||||||
@@ -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();
|
||||||
|
})();
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"scripts": {
|
||||||
|
"start": "node main.js"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"playwright": "1.23.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||||
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
playwright-core@1.23.0:
|
||||||
|
version "1.23.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.23.0.tgz#51e24121b3a5bbe759d79738d8eff7a63156293c"
|
||||||
|
integrity sha512-Zzhyr5RZGoJ1ek2sgfJCt2076kdOg8hnNwFBqAYeLySiutXyxSQk93vZ5gbnFiWV1sHvueCcwla9n35acUTxtA==
|
||||||
|
|
||||||
|
playwright@1.23.0:
|
||||||
|
version "1.23.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.23.0.tgz#93b53fa0ba194d62b8af1be7e2bceff3585fe031"
|
||||||
|
integrity sha512-rfZfuLueBPGV3UdEqPQxS8Uw7TgVMATWSPb3O0oV8SZBmVAhOndkOU9MPP8dxJoQI68r94yevuObPr14PhW9Xg==
|
||||||
|
dependencies:
|
||||||
|
playwright-core "1.23.0"
|
||||||
Reference in New Issue
Block a user