1.0.18 • Published 3 months ago

pwf-test-ck v1.0.18

Weekly downloads
-
License
ISC
Repository
-
Last release
3 months ago

NPM Packages

UseScript
PNPM Packagenpm i -g pnpmFor efficient package manager
add tsconfigpnpm tsc --init
tsuppnpm add tsup -Dbundle library
noUncheckedIndexedAccessnoEmit - truchange in tsconfig
package.jsontsup framework --format cjs, esm --dts
to buildpnpm run build
Changesetpnpm add -D @changesets/cli

ref: https://www.youtube.com/watch?v=eh89VE3Mk5g

Playwright Guide

Installation

UseScript
Installationnpm init playwright@latest
Runs the end-to-end testsnpx playwright test
Starts the interactive UI mode.npx playwright test --ui
trace onnpx playwright test --trace on
Runs the tests only on Desktop Chrome.npx playwright test --project=chromium
Runs the tests in a specific file.npx playwright test example
Runs the tests in debug mode.npx playwright test --debug
Auto generate tests with Codegennpx playwright codegen
Show Reportnpx playwright show-report
Open Playwright Inspectornpx playwright open
Generate Allure reportingnpx allure generate ./allure-results --clean
Open Allure reportnpx allure open ./allure-report/
To Run tests in localTEST_ENV=local npx playwright test
To Run a specfic testnpx playwright test -g "test name"

Running tests using env variable : https://medium.com/@irfan17sat/configuring-multiple-environments-in-playwright-67e402c1c627

Automation Testing Principles : https://testingconsultancy-my.sharepoint.com/:w:/g/personal/aadhith_bose_ttcglobal_com/EW6TZYI_XhVLu2b1MFb-Mk4BInbKTyKlBwifFnGdh-RmPQ?e=sNZvUW

Page Objects

NameDescription
By Tag Namepage.locator('input')
By IDpage.locator('#id')
By Class Valuepage.locator('.class value')
By Attributepage.locator('[placeholder="Email"]')
By Full Class Valuepage.locator('[class="full static shape rectangle"]')
Combinepage.locator('#id').locator(.class)
Combinepage.locator('#id').getByRole('button, {name:"Sign in"}')
By Xpathpage.locator('//xpath')
By Partial textpage.locator(':text("Email")')
By Exact textpage.locator(':text-is("Email here")')
1.0.18

3 months ago

1.0.17

3 months ago

1.0.16

3 months ago

1.0.9

3 months ago

1.0.8

3 months ago

1.0.7

3 months ago

1.0.11

3 months ago

1.0.10

3 months ago

1.0.15

3 months ago

1.0.14

3 months ago

1.0.13

3 months ago

1.0.12

3 months ago

1.0.2

3 months ago

1.0.1

3 months ago

1.0.6

3 months ago

1.0.5

3 months ago

1.0.4

3 months ago

1.0.3

3 months ago

1.0.0

3 months ago