Skip to content

cephalin/screenshot-automation

Repository files navigation

To get setup

  1. In Visual Studio Code, install the Playwright Test for VSCode extension.

  2. Install Node.js.

    npx playwright install
    
  3. Clone, install dependencies, and open the repo in VSCode:

    git clone https://github.com/cephalin/screenshot-automation.git
    cd screenshot-automation
    npm install
    code .
    
  4. In VSCode, open the command palette and type "Test: Install Playwright".

  5. Go to the Test browser and choose one of the tests to run.

To auhenticate manually

Supply Azure/GitHub credentials in .env.

To use a stored auth session file

  1. Run the following command in the repo root to generate auth.json:

    npx playwright codegen --save-storage=auth.json
    
  2. In the pop-up browser, log into Azure portal and GitHub. Close the browser.

  3. Above the Playwright script in *.spec.ts (under /tests), reference auth.json.

    test.use({ storageState: "auth.json" });
    

About

Done with Playwright

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published