correction on handleErrors
This commit is contained in:
+5
-1
@@ -12,4 +12,8 @@ adb -s 07f9c883 shell am set-debug-app --persistent com.android.chrome
|
|||||||
adb -s 07f9c883 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
|
adb -s 07f9c883 shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
|
||||||
adb -s 76a3ac8d shell pm clear com.android.chrome
|
adb -s 76a3ac8d shell pm clear com.android.chrome
|
||||||
adb -s 76a3ac8d shell am set-debug-app --persistent com.android.chrome
|
adb -s 76a3ac8d shell am set-debug-app --persistent com.android.chrome
|
||||||
adb -s 76a3ac8d shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
|
adb -s 76a3ac8d shell am start -n com.android.chrome/com.google.android.apps.chrome.Main
|
||||||
|
#xiao mi
|
||||||
|
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
|
||||||
@@ -200,15 +200,12 @@ class CommandorPage {
|
|||||||
document.getElementById("g-recaptcha-response").innerHTML = solution;
|
document.getElementById("g-recaptcha-response").innerHTML = solution;
|
||||||
}, solution)
|
}, solution)
|
||||||
this.clickValid();
|
this.clickValid();
|
||||||
|
} catch
|
||||||
|
(e) {
|
||||||
|
console.log(e)
|
||||||
|
this.isTerminated = true;
|
||||||
}
|
}
|
||||||
catch
|
} else {
|
||||||
(e)
|
|
||||||
{
|
|
||||||
console.log(e)
|
|
||||||
this.isTerminated = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
this.isTerminated = true;
|
this.isTerminated = true;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -225,14 +222,14 @@ class CommandorPage {
|
|||||||
if (currentPage.url() === RDV_URL) {
|
if (currentPage.url() === RDV_URL) {
|
||||||
await this.fillFields(this.page);
|
await this.fillFields(this.page);
|
||||||
if (this.isFillingFields)
|
if (this.isFillingFields)
|
||||||
this.getErrors()
|
await this.getErrors()
|
||||||
} else {
|
} else {
|
||||||
if (content.includes(MESSAGE_URL_VALIDATION_FR)) {
|
if (content.includes(MESSAGE_URL_VALIDATION_FR)) {
|
||||||
console.log("successful");
|
console.log("successful");
|
||||||
await this.push_message_to_queue(PublishType.SUCCESS);
|
await this.push_message_to_queue(PublishType.SUCCESS);
|
||||||
} else {
|
} else {
|
||||||
// try to get errors
|
// try to get errors
|
||||||
this.getErrors()
|
await this.getErrors()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -286,14 +283,14 @@ class CommandorPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getErrors() {
|
async getErrors() {
|
||||||
if (this.page.url() === BLANK_URL) {
|
if (this.page.url() === BLANK_URL) {
|
||||||
this.isTerminated = true;
|
this.isTerminated = true;
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
let errorItem = this.page.querySelector("div.alert");
|
let errorItem = this.page.locator("div.alert");
|
||||||
if (errorItem) {
|
if (errorItem) {
|
||||||
let errorContent = errorItem.innerHTML;
|
let errorContent = await errorItem.innerHTML();
|
||||||
console.log("error:" + errorContent);
|
console.log("error:" + errorContent);
|
||||||
this.handleError(errorContent);
|
this.handleError(errorContent);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user