Merge branch 'feature/share_cookies' of bitbucket.org:panleicim/puppeteerjs into feature/share_cookies
This commit is contained in:
@@ -891,7 +891,11 @@ class CommandorPage {
|
||||
cookiesString = cookiesString + cookie.name + "=" + cookie.value + ";"
|
||||
})
|
||||
console.log(cookiesString);
|
||||
this.sender.sendMessage(cookiesString)
|
||||
|
||||
if (this.contact.ipCountry === "DE")
|
||||
this.sender.sendMessage(cookiesString, "REQUEST_DATA_DE")
|
||||
else
|
||||
this.sender.sendMessage(cookiesString)
|
||||
// let content = await this.page.content()
|
||||
// console.log(content)
|
||||
await this.page.bringToFront();
|
||||
@@ -1228,21 +1232,21 @@ class CommandorPage {
|
||||
|
||||
async enableDisableAirPlanMode() {
|
||||
logWithDevice("will enable/disable airplane mode", this.device)
|
||||
try {
|
||||
// await this.device.shell("cmd connectivity airplane-mode enable")
|
||||
await exceutShellCmd(this.device, "cmd connectivity airplane-mode enable")
|
||||
await delay(1000)
|
||||
await exceutShellCmd(this.device, "cmd connectivity airplane-mode disable")
|
||||
// await this.device.shell("cmd connectivity airplane-mode disable")
|
||||
await delay(2000)
|
||||
} catch (e) {
|
||||
try {
|
||||
await this.device.shell("cmd connectivity airplane-mode disable")
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
}
|
||||
console.log(e)
|
||||
}
|
||||
// try {
|
||||
// // await this.device.shell("cmd connectivity airplane-mode enable")
|
||||
// await exceutShellCmd(this.device, "cmd connectivity airplane-mode enable")
|
||||
// await delay(1000)
|
||||
// await exceutShellCmd(this.device, "cmd connectivity airplane-mode disable")
|
||||
// // await this.device.shell("cmd connectivity airplane-mode disable")
|
||||
// await delay(2000)
|
||||
// } catch (e) {
|
||||
// try {
|
||||
// await this.device.shell("cmd connectivity airplane-mode disable")
|
||||
// } catch (e) {
|
||||
// console.log(e)
|
||||
// }
|
||||
// console.log(e)
|
||||
// }
|
||||
}
|
||||
|
||||
async tapGoogleDisconnectBtn() {
|
||||
|
||||
Reference in New Issue
Block a user