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