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 pm clear com.android.chrome
|
||||||
adb -s 47e7e36b shell am set-debug-app --persistent 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
|
adb -s 47e7e36b shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
|
||||||
#asus tab
|
#huawei
|
||||||
adb -s 751005221815 shell pm clear com.android.chrome
|
adb -s EPHUT20825001518 shell pm clear com.android.chrome
|
||||||
adb -s 751005221815 shell am set-debug-app --persistent com.android.chrome
|
adb -s EPHUT20825001518 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
|
adb -s EPHUT20825001518 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
|
||||||
|
|
||||||
#xiaomi tab
|
#xiaomi tab
|
||||||
adb -s 5ac879a2 shell pm clear com.android.chrome
|
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,9 +120,15 @@ class CommandorPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fillEmail(page) {
|
async fillEmail(page) {
|
||||||
await page.locator(EMAIL_ID).focus();
|
try {
|
||||||
await delay(getRandomWaitTime())
|
if (!page.isClosed()) {
|
||||||
await page.locator(EMAIL_ID).fill(this.contact.mail);
|
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) {
|
async inputPhoneNumber(page) {
|
||||||
@@ -157,24 +163,47 @@ class CommandorPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async inputPassportId(page) {
|
async inputPassportId(page) {
|
||||||
await page.locator(PASSPORT_ID).focus()
|
try {
|
||||||
await delay(getRandomWaitTime())
|
if (!page.isClosed()) {
|
||||||
await page.locator(PASSPORT_ID).fill(this.contact.passportNumber.toString())
|
|
||||||
|
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) {
|
async checkCGU(page) {
|
||||||
await page.locator(CGU_ID).focus()
|
try {
|
||||||
await page.locator(CGU_ID).click()
|
if (!page.isClosed()) {
|
||||||
await delay(getRandomWaitTime())
|
await page.locator(CGU_ID).focus()
|
||||||
await page.locator(PROCESSING_ID).focus()
|
await page.locator(CGU_ID).click()
|
||||||
await page.locator(PROCESSING_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) {
|
async chooseStore(page) {
|
||||||
await page.locator(PREFER_STORE).focus()
|
try {
|
||||||
await delay(1000)
|
if (!page.isClosed()) {
|
||||||
await page.click(PREFER_STORE);
|
await page.locator(PREFER_STORE).focus()
|
||||||
await page.selectOption(PREFER_STORE, "faubourg");
|
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);
|
// await page.click(PREFER_STORE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user