try to support mi note 10
This commit is contained in:
@@ -218,6 +218,7 @@ class CommandorPage {
|
||||
async clickOnlineAppointment() {
|
||||
try {
|
||||
logWithDevice("will click on rdv link", this.device);
|
||||
await this.connectBrowserIfNecessary();
|
||||
const [button] = await this.page.$x("//a[contains(., 'rendezvousparis')]");
|
||||
console.log("button is " + button)
|
||||
if (button) {
|
||||
@@ -701,6 +702,20 @@ class CommandorPage {
|
||||
}
|
||||
}
|
||||
|
||||
async connectBrowserIfNecessary() {
|
||||
if (!this.browser.isConnected()) {
|
||||
try {
|
||||
this.browser = await puppeteer.connect({
|
||||
browserWSEndpoint: "ws://127.0.0.1:" + this.port + "/devtools/browser",
|
||||
headless: false, defaultViewport: null
|
||||
})
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
this.isTerminated = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async checkResultWithOcr() {
|
||||
console.log("checkResultWithOcr() called.")
|
||||
await delay(2000);
|
||||
@@ -867,6 +882,8 @@ class CommandorPage {
|
||||
this.device.shell("input tap " + 385 + " " + 1930)
|
||||
} else if (model === "ASUS_X00QD") {
|
||||
this.device.shell("input tap " + 490 + " " + 1910)
|
||||
} else if (model === "Mi Note 10") {
|
||||
this.device.shell("input tap " + 550 + " " + 1920)
|
||||
} else
|
||||
this.device.shell("input tap " + 385 + " " + 2050)
|
||||
await delay(2000);
|
||||
|
||||
Reference in New Issue
Block a user