Skip to content

MichalNowakowski-dev/Automation-training

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test Automation training

Links

Commands

  • check NodeJS version
    node -v
  • new project with Playwright
    npm init playwright@latest
  • record tests for given site
    npx playwright codegen https://demo-bank.vercel.app/
  • run tests without browser GUI
    npx playwright test
  • run tests with browser GUI
    npx playwright test --headed
  • view report
    npx playwright show-report
  • cancelling Node process
    hit twice Ctrl + C

Playwright Config modifications

  • config file playwright.config.ts
  • disable browsers, i.e. Firefox
    // {
    //   name: 'firefox',
    //   use: { ...devices['Desktop Firefox'] },
    // },
    
    // {
    //   name: 'webkit',
    //   use: { ...devices['Desktop Safari'] },
    // }

Visual Studio Code

  • Preview: for README.md
  • Autosave: in File -> Auto Save
  • Timeline: file context menu -> Open Timeline
  • Formatting: editor -> context menu -> Format Document

Playwright snippets

  • test:
    test('test description', async ({ page }) => {
    
    });
  • describe:
     describe('Group description', () => {
    
     });
  • running one test: test.only

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors