|
@@ -5,8 +5,9 @@ import setupRoute from "./setupRoute.js";
|
|
|
|
|
|
|
|
export async function login(email, password, proxy) {
|
|
export async function login(email, password, proxy) {
|
|
|
const browser = await chromium.launch({
|
|
const browser = await chromium.launch({
|
|
|
- headless: true,
|
|
|
|
|
|
|
+ headless: false,
|
|
|
devtools: false,
|
|
devtools: false,
|
|
|
|
|
+ timeout: 120000,
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const options = {
|
|
const options = {
|
|
@@ -85,7 +86,9 @@ export async function login(email, password, proxy) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
- await page.waitForURL("https://www.pcoptimum.ca/dashboard");
|
|
|
|
|
|
|
+ await page.waitForURL("https://www.pcoptimum.ca/dashboard", {
|
|
|
|
|
+ timeout: 120000,
|
|
|
|
|
+ });
|
|
|
for (let i = 0; i < 30; i++) {
|
|
for (let i = 0; i < 30; i++) {
|
|
|
await page.waitForTimeout(1000);
|
|
await page.waitForTimeout(1000);
|
|
|
if (points) break;
|
|
if (points) break;
|