check page is closed or not before inputing user info
This commit is contained in:
@@ -124,10 +124,12 @@ class CommandorPage {
|
|||||||
async inputName(page) {
|
async inputName(page) {
|
||||||
await page.locator(LAST_NAME).focus()
|
await page.locator(LAST_NAME).focus()
|
||||||
await delay(getRandomWaitTime())
|
await delay(getRandomWaitTime())
|
||||||
await page.locator(LAST_NAME).fill(this.contact.lastName)
|
if (!page.isClosed()) {
|
||||||
await page.locator(FIRST_NAME).focus()
|
await page.locator(LAST_NAME).fill(this.contact.lastName)
|
||||||
await delay(getRandomWaitTime())
|
await page.locator(FIRST_NAME).focus()
|
||||||
await page.locator(FIRST_NAME).fill(this.contact.firstName)
|
await delay(getRandomWaitTime())
|
||||||
|
await page.locator(FIRST_NAME).fill(this.contact.firstName)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async inputPassportId(page) {
|
async inputPassportId(page) {
|
||||||
|
|||||||
Reference in New Issue
Block a user