rm unused codes
This commit is contained in:
@@ -833,13 +833,13 @@ class CommandorPage {
|
||||
logWithDevice("get pages", this.device)
|
||||
|
||||
let pages = await this.browser.pages();
|
||||
let needPages = pages.filter(currentPage => currentPage.url() === RDV_URL)
|
||||
this.page = needPages[0]
|
||||
// pages.forEach((currentPage) => {
|
||||
// if (currentPage.url() === RDV_URL) {
|
||||
// this.page = currentPage;
|
||||
// }
|
||||
// })
|
||||
// let needPages = pages.filter(currentPage => currentPage.url() === RDV_URL)
|
||||
// this.page = needPages[0]
|
||||
pages.forEach((currentPage) => {
|
||||
if (currentPage.url() === RDV_URL) {
|
||||
this.page = currentPage;
|
||||
}
|
||||
})
|
||||
logWithDevice("this.page.bringToFront();", this.device)
|
||||
|
||||
await this.page.bringToFront();
|
||||
@@ -858,8 +858,13 @@ class CommandorPage {
|
||||
logWithDevice("get pages", this.device)
|
||||
let pages = await this.browser.pages();
|
||||
logWithDevice("get current page", this.device)
|
||||
let needPages = pages.filter(currentPage => currentPage.url() === RDV_URL)
|
||||
this.page = needPages[0]
|
||||
// let needPages = pages.filter(currentPage => currentPage.url() === RDV_URL)
|
||||
// this.page = needPages[0]
|
||||
pages.forEach((currentPage) => {
|
||||
if (currentPage.url() === RDV_URL) {
|
||||
this.page = currentPage;
|
||||
}
|
||||
})
|
||||
logWithDevice("this.page.bringToFront();", this.device)
|
||||
await this.page.bringToFront();
|
||||
// this.page = pages;
|
||||
|
||||
Reference in New Issue
Block a user