test with touchscreen param

This commit is contained in:
Lei PAN
2023-07-17 23:28:28 +02:00
parent 6e11205f46
commit 2606ad362c
2 changed files with 4 additions and 5 deletions
+3 -4
View File
@@ -312,7 +312,6 @@ class CommandorPage {
async inputPhoneNumber(page) {
logWithDevice("inputPhoneNumber", this.device)
try {
if (this.browser.isConnected() && !this.isTerminated) {
if (!this.isPhoneInput) {
@@ -325,7 +324,7 @@ class CommandorPage {
}
})
await delay(1000);
await page.keyboard.type("0" + this.contact.phoneNumber);
await page.keyboard.type("+33 " + this.contact.phoneNumber);
this.isPhoneInput = true;
}
}
@@ -576,7 +575,7 @@ class CommandorPage {
let pageContent = await page.content()
let hasCaptcha = pageContent.includes("g-recaptcha-response")
if (hasCaptcha) {
// await this.clickCheckbox()
await this.clickCheckbox()
await delay(1000)
this.captchaSolver = new SolveCaptcha(page);
await this.captchaSolver.start((solution) => {
@@ -701,7 +700,7 @@ class CommandorPage {
}
// save to mongoDb
let reserve = ReserveResultPojo.create_from_contact(this.contact, id, url, this.choosedStore, publishType);
reserve.source_from = this.device.model();
reserve.source_from = this.device.serial();
await this.mongoManager.saveReserveToDb(reserve.to_mongo_dict())
await this.page.close();
// await this.deleteFromBlackList()