input directly the firstName
This commit is contained in:
@@ -381,14 +381,15 @@ class CommandorPage {
|
||||
}, this.contact.lastName)
|
||||
await page.focus(FIRST_NAME);
|
||||
await delay(getRandomWaitTime());
|
||||
console.log("will clear name field");
|
||||
await page.evaluate(() => {
|
||||
// console.log("will clear name field");
|
||||
await page.evaluate((firstName) => {
|
||||
let field = document.getElementById("name");
|
||||
if (field) {
|
||||
field.value = ""
|
||||
field.value = firstName;
|
||||
// field.value = ""
|
||||
}
|
||||
})
|
||||
await page.keyboard.type(this.contact.firstName);
|
||||
}, this.contact.firstName)
|
||||
// await page.keyboard.type(this.contact.firstName);
|
||||
this.isNameInput = true;
|
||||
}
|
||||
}
|
||||
@@ -906,13 +907,13 @@ class CommandorPage {
|
||||
if (currentPage.url() === RDV_URL) {
|
||||
this.page = currentPage;
|
||||
} else {
|
||||
try {
|
||||
if (!currentPage.isClosed()) {
|
||||
currentPage.close()
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
// try {
|
||||
// if (!currentPage.isClosed()) {
|
||||
// currentPage.close()
|
||||
// }
|
||||
// } catch (e) {
|
||||
// console.log(e)
|
||||
// }
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user