rm unused codes

This commit is contained in:
Lei PAN
2023-07-18 19:10:27 +02:00
parent 343449b17c
commit 9e8a2f129d
+14 -9
View File
@@ -833,13 +833,13 @@ class CommandorPage {
logWithDevice("get pages", this.device) logWithDevice("get pages", this.device)
let pages = await this.browser.pages(); let pages = await this.browser.pages();
let needPages = pages.filter(currentPage => currentPage.url() === RDV_URL) // let needPages = pages.filter(currentPage => currentPage.url() === RDV_URL)
this.page = needPages[0] // this.page = needPages[0]
// pages.forEach((currentPage) => { pages.forEach((currentPage) => {
// if (currentPage.url() === RDV_URL) { if (currentPage.url() === RDV_URL) {
// this.page = currentPage; this.page = currentPage;
// } }
// }) })
logWithDevice("this.page.bringToFront();", this.device) logWithDevice("this.page.bringToFront();", this.device)
await this.page.bringToFront(); await this.page.bringToFront();
@@ -858,8 +858,13 @@ class CommandorPage {
logWithDevice("get pages", this.device) logWithDevice("get pages", this.device)
let pages = await this.browser.pages(); let pages = await this.browser.pages();
logWithDevice("get current page", this.device) logWithDevice("get current page", this.device)
let needPages = pages.filter(currentPage => currentPage.url() === RDV_URL) // let needPages = pages.filter(currentPage => currentPage.url() === RDV_URL)
this.page = needPages[0] // this.page = needPages[0]
pages.forEach((currentPage) => {
if (currentPage.url() === RDV_URL) {
this.page = currentPage;
}
})
logWithDevice("this.page.bringToFront();", this.device) logWithDevice("this.page.bringToFront();", this.device)
await this.page.bringToFront(); await this.page.bringToFront();
// this.page = pages; // this.page = pages;