From 71761a7a52e3c729b2af9cfc84a994637b66e803 Mon Sep 17 00:00:00 2001 From: as10968574 Date: Mon, 24 Jun 2024 22:55:50 +0800 Subject: [PATCH] Update main_test.js --- lab4/main_test.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/lab4/main_test.js b/lab4/main_test.js index ded9862b..e86bfc57 100644 --- a/lab4/main_test.js +++ b/lab4/main_test.js @@ -9,7 +9,6 @@ const puppeteer = require('puppeteer'); // Navigate the page to a URL await page.goto('https://pptr.dev/'); - // Click search button await page.click('button.DocSearch.DocSearch-Button'); @@ -32,21 +31,6 @@ const puppeteer = require('puppeteer'); // Print the title console.log(title); - // Close the browser await browser.close(); })(); - - // Hints: - // Click search button - // Type into search box - // Wait for search result - // Get the `Docs` result section - // Click on first result in `Docs` section - // Locate the title - // Print the title - - // Close the browser - await browser.close(); -})(); -