Merge branch 'master' into feature/check_exist_before_booking
This commit is contained in:
+4
-4
@@ -17,10 +17,10 @@ adb -s 76a3ac8d shell am start -n com.android.chrome/com.google.android.apps.chr
|
||||
adb -s 47e7e36b shell pm clear com.android.chrome
|
||||
adb -s 47e7e36b shell am set-debug-app --persistent com.android.chrome
|
||||
adb -s 47e7e36b shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
|
||||
#asus tab
|
||||
adb -s 751005221815 shell pm clear com.android.chrome
|
||||
adb -s 751005221815 shell am set-debug-app --persistent com.android.chrome
|
||||
adb -s 751005221815 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
|
||||
#huawei
|
||||
adb -s EPHUT20825001518 shell pm clear com.android.chrome
|
||||
adb -s EPHUT20825001518 shell am set-debug-app --persistent com.android.chrome
|
||||
adb -s EPHUT20825001518 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
|
||||
|
||||
#xiaomi tab
|
||||
adb -s 5ac879a2 shell pm clear com.android.chrome
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
const {_android: android} = require('playwright');
|
||||
const {exec} = require("child_process");
|
||||
android.devices().then((devices) => {
|
||||
devices.forEach((device) => {
|
||||
exec("scrcpy -s " + device.serial(), (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.log(`error: ${error.message}`);
|
||||
return;
|
||||
}
|
||||
if (stderr) {
|
||||
console.log(`stderr: ${stderr}`);
|
||||
return;
|
||||
}
|
||||
console.log(`stdout: ${stdout}`);
|
||||
});
|
||||
})
|
||||
|
||||
})
|
||||
@@ -120,10 +120,16 @@ class CommandorPage {
|
||||
}
|
||||
|
||||
async fillEmail(page) {
|
||||
try {
|
||||
if (!page.isClosed()) {
|
||||
await page.locator(EMAIL_ID).focus();
|
||||
await delay(getRandomWaitTime())
|
||||
await page.locator(EMAIL_ID).fill(this.contact.mail);
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
}
|
||||
|
||||
async inputPhoneNumber(page) {
|
||||
try {
|
||||
@@ -157,24 +163,47 @@ class CommandorPage {
|
||||
}
|
||||
|
||||
async inputPassportId(page) {
|
||||
try {
|
||||
if (!page.isClosed()) {
|
||||
|
||||
await page.locator(PASSPORT_ID).focus()
|
||||
await delay(getRandomWaitTime())
|
||||
await page.locator(PASSPORT_ID).fill(this.contact.passportNumber.toString())
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
this.isTerminated = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async checkCGU(page) {
|
||||
try {
|
||||
if (!page.isClosed()) {
|
||||
await page.locator(CGU_ID).focus()
|
||||
await page.locator(CGU_ID).click()
|
||||
await delay(getRandomWaitTime())
|
||||
await page.locator(PROCESSING_ID).focus()
|
||||
await page.locator(PROCESSING_ID).click()
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
this.isTerminated = true;
|
||||
}
|
||||
}
|
||||
|
||||
async chooseStore(page) {
|
||||
try {
|
||||
if (!page.isClosed()) {
|
||||
await page.locator(PREFER_STORE).focus()
|
||||
await delay(1000)
|
||||
await page.click(PREFER_STORE);
|
||||
await page.selectOption(PREFER_STORE, "faubourg");
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
this.isTerminated = true;
|
||||
}
|
||||
// await page.click(PREFER_STORE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user