summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2020-11-14 14:17:20 +0300
committereug-vs <eug-vs@keemail.me>2020-11-14 14:17:20 +0300
commit653ab44077a0feecd59755af297550be57c1eb34 (patch)
tree15681602c05e38a223e64cc6d55dccf0ea6a59ba
parent0cd365937ed7b2fc986c6038dca8b96a1f2bdf4c (diff)
downloadbsu-fantom-653ab44077a0feecd59755af297550be57c1eb34.tar.gz
feat: click on <a> instead of <li>
-rw-r--r--src/index.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/index.js b/src/index.js
index d240be0..6fa3b7b 100644
--- a/src/index.js
+++ b/src/index.js
@@ -27,7 +27,7 @@ puppeteer.launch({ headless: true })
// Find the course
await page.goto(COURSE_URL);
await Promise.all([
- clickElementBySelector(page, 'li.bigbluebuttonbn'),
+ clickElementBySelector(page, 'li.bigbluebuttonbn a'),
page.waitForNavigation() // Wait until the next page loads
]);
@@ -42,7 +42,7 @@ puppeteer.launch({ headless: true })
// Prepare onJoin callback
const fillAttendance = async () => {
await page.goBack();
- await clickElementBySelector(page, 'li.attendance');
+ await clickElementBySelector(page, 'li.attendance a');
// TODO: actually fill the attendance
console.log('Attendance filled');
};