adapt oppo
This commit is contained in:
@@ -707,7 +707,7 @@ class CommandorPage {
|
||||
}
|
||||
// save to mongoDb
|
||||
let reserve = ReserveResultPojo.create_from_contact(this.contact, id, url, this.choosedStore, publishType);
|
||||
reserve.source_from = this.device.serial();
|
||||
reserve.source_from = this.device.model();
|
||||
await this.mongoManager.saveReserveToDb(reserve.to_mongo_dict())
|
||||
await this.page.close();
|
||||
// await this.deleteFromBlackList()
|
||||
@@ -833,11 +833,13 @@ class CommandorPage {
|
||||
logWithDevice("get pages", this.device)
|
||||
|
||||
let pages = await this.browser.pages();
|
||||
pages.forEach((currentPage) => {
|
||||
if (currentPage.url() === RDV_URL) {
|
||||
this.page = currentPage;
|
||||
}
|
||||
})
|
||||
let needPages = pages.filter(currentPage => currentPage.url() === RDV_URL)
|
||||
this.page = needPages[0]
|
||||
// pages.forEach((currentPage) => {
|
||||
// if (currentPage.url() === RDV_URL) {
|
||||
// this.page = currentPage;
|
||||
// }
|
||||
// })
|
||||
logWithDevice("this.page.bringToFront();", this.device)
|
||||
|
||||
await this.page.bringToFront();
|
||||
@@ -856,11 +858,8 @@ class CommandorPage {
|
||||
logWithDevice("get pages", this.device)
|
||||
let pages = await this.browser.pages();
|
||||
logWithDevice("get current page", this.device)
|
||||
pages.forEach((currentPage) => {
|
||||
if (currentPage.url() === RDV_URL) {
|
||||
this.page = currentPage;
|
||||
}
|
||||
})
|
||||
let needPages = pages.filter(currentPage => currentPage.url() === RDV_URL)
|
||||
this.page = needPages[0]
|
||||
logWithDevice("this.page.bringToFront();", this.device)
|
||||
await this.page.bringToFront();
|
||||
// this.page = pages;
|
||||
@@ -1120,11 +1119,14 @@ class CommandorPage {
|
||||
if (this.device.model() === "MI 5s") {
|
||||
if (this.browserPackageName.includes("brave"))
|
||||
await this.device.shell("input tap " + 535 + " " + 1629)
|
||||
|
||||
else
|
||||
await this.device.shell("input tap " + 550 + " " + 1740)
|
||||
} else
|
||||
await this.device.shell("input tap " + 411 + " " + 2100)
|
||||
} else {
|
||||
if (this.browserPackageName.includes("brave") && this.device.model() === "CPH2219") {
|
||||
await this.device.shell("input tap " + 411 + " " + 1977)
|
||||
} else
|
||||
await this.device.shell("input tap " + 411 + " " + 2100)
|
||||
}
|
||||
await delay(2000);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user