Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {
- loggaInViaMobiltBankid,
- screenshot
- } from "../utilities";
- const VIEWPORT = { width: 1920, height: 1080 };
- const url = "https://customerportal.intrum.com/se";
- const inkasso = "Intrum";
- const selectors = {
- login: ".provider-bankid-mobile-se",
- };
- export default {
- crawl: async (browser) => {
- console.log(`\n\nCrawling ${inkasso}...`);
- const page = await browser.newPage();
- await page.setViewport(VIEWPORT);
- console.log(`Going to url ${url}`);
- await page.goto(url);
- console.log("Going to mina sidor");
- await page.waitForSelector(selectors.login, { timeout: 5000 })
- await page.click(selectors.login);
- await loggaInViaMobiltBankid(page, "personnummr 199200000");
- await page.screenshot({
- path: `screenshots/${inkasso}.png`,
- fullPage: true
- });
- const html = await page.content();
- screenshot(html, inkasso)
- console.log("Done with Intrum!");
- page.close();
- return true;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement