const puppeteer = require('puppeteer');
(async () => {
// Launch a new browser instance
const browser = await puppeteer.launch();
// Create a new page instance
const page = await browser.newPage();
// Navigate to the login page
await page.goto('https://apps.fortnox.se/api/login-fortnox-id/web-login-v1');
// Fill in the username field
const usernameInput = await page.$('#Username'); // your query how to extract the username input field
await usernameInput.type('your-username-here');
// Click the next button
const nextButton = await page.$('#NextButton'); // your query how to extract the next button
await nextButton.click();
// Wait for the page to load after clicking the next button
await page.waitForNavigation();
// Close the browser instance
await browser.close();
})();
Created
February 28, 2023 06:26
-
-
Save Bucephalus-lgtm/2ad631f7edd701a4e1d7dd872f7ca0f6 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment