mirror of
https://github.com/intergalacticalvariable/reader.git
synced 2024-11-16 03:32:25 +08:00
update the start script
This commit is contained in:
parent
66183d8216
commit
6309cbd7a0
|
@ -591,8 +591,30 @@ document.addEventListener('load', handlePageLoad);
|
|||
);
|
||||
}
|
||||
});
|
||||
|
||||
try {
|
||||
console.log('Waiting for Sign Out link');
|
||||
await page.waitForSelector('a[href="/signout"]', { timeout: 10000 });
|
||||
console.log('Sign Out link found');
|
||||
} catch (error) {
|
||||
this.logger.warn(`Timed out waiting for Sign Out link: ${error}`);
|
||||
}
|
||||
|
||||
try {
|
||||
console.log('Clicking on #getOwnerDetails');
|
||||
await page.click('#getOwnerDetails');
|
||||
console.log('Clicked on #getOwnerDetails');
|
||||
|
||||
// console.log('Waiting for Phone No span to appear');
|
||||
// await page.waitForSelector('span:contains("Phone No :")', { timeout: 10000 });
|
||||
// console.log('Phone No span appeared');
|
||||
} catch (error) {
|
||||
this.logger.warn(`Error during click or wait operation: ${error}`);
|
||||
}
|
||||
|
||||
let waitForPromise: Promise<any> | undefined;
|
||||
if (options?.waitForSelector) {
|
||||
console.log('Waiting for selector', options.waitForSelector);
|
||||
const t0 = Date.now();
|
||||
waitForPromise = nextSnapshotDeferred.promise.then(() => {
|
||||
const t1 = Date.now();
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "ts-node src/server.ts"
|
||||
"start": "cd backend/functions && npx nodemon --watch ./src --exec \"npm run build && node build/server.js\"",
|
||||
"build": "tsc"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
|
@ -13,7 +14,8 @@
|
|||
"firebase-tools": "^12.4.2",
|
||||
"typescript": "^5.1.6",
|
||||
"@types/express": "^4.17.17",
|
||||
"ts-node": "^10.9.1"
|
||||
"ts-node": "^10.9.1",
|
||||
"nodemon": "^2.0.22"
|
||||
},
|
||||
"dependencies": {
|
||||
"express": "^4.17.1",
|
||||
|
|
Loading…
Reference in New Issue
Block a user