Skip to content

Commit

Permalink
fix whatsapp web changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Briuor committed Dec 17, 2020
1 parent 033032d commit 4290526
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function needsToScan() {
function isInsideChat() {
return from(
page
.waitForFunction(`document.getElementsByClassName('h70RQ two')[0]`,
.waitForFunction(`document.getElementsByClassName('two')[0]`,
{
timeout: 0,
}).then(() => true)
Expand Down Expand Up @@ -150,7 +150,7 @@ async function sendTo(phoneOrContact, message) {
process.stdout.write("Sending Message...\r");
await page.goto(`https://web.whatsapp.com/send?phone=${phone}&text=${encodeURIComponent(message)}`);
await page.waitForSelector("div#startup", { hidden: true, timeout: 60000 });
await page.waitForSelector('div[tabindex="-1"]', { timeout: 5000 });
await page.waitForSelector('#main > footer > div._3SvgF._1mHgA.copyable-area > div.DuUXI > div > div._1awRl.copyable-text.selectable-text', { timeout: 5000 });
await page.keyboard.press("Enter");
await page.waitFor(1000);
process.stdout.clearLine();
Expand Down

0 comments on commit 4290526

Please sign in to comment.