automation-library-playwright
v1.0.0
Published
A reusable automation library
Downloads
3
Readme
Prerequisite
- Install Git Bash with PIP->Verify using cmd-> git --version
- Install Visual Studio Code
- Install AWS CLI
- Install Node JS-> Verify using cmd-> node --version
- Create the folder in File Explorer-> test-automation-ts in c:/user/<User_Name>
Steps to follow sso codecommit
Steps 1: Open Command Prompt, Steps 2: aws configure sso Steps 3: https://d-9f670aca64.awsapps.com/start/# Steps 4: ap-south-1 Steps 5: Press Enter Steps 6: Approve request from browser Steps 7: back to cmd Steps 8: us-east-1 Steps 9: json Steps 10: Press Enter Steps 11: git clone codecommit::us-east-1:// @ <folder_location-where-code reside> Example: git clone codecommit::us-east-1://info-non-prod-developer-407125827522@test-automation-ts C:\Users<User_Name>\test-automation-ts
Set up Environment Variable
step 1: Open "edit environment variable" click on New button step 2: Enter Variable name as TESTAPP_PATH step 3: Click on browser directory and broswer to C:\Users<User_Name>\test-automation-ts click ok step 4: In edit enviroment variable click ok button
Update .env file to specified Database
FILE_GEN_FOLDER= "C:\Users<User_name>\test-automation-ts\test" RESULT_DB_HOST="" RESULT_DB_PORT= RESULT_DB_TYPE="" RESULT_DB_NAME="" RESULT_DB_USER="" RESULT_DB_PASSWORD="" RESULT_DB_SCHEMA=""
Update Execution Time and Assert Time(If Required in Playwright.config.ts)
timeout: 5 * 60 * 1000, expect : { timeout: 30*1000 },
Framework Set Up
step 1: Open Playwright Framework folder C:\Users<User_name>\test-automation-ts step 2: Open terminal in Visual Studio Code and Execute
- npm install
- npx playwright install
- npm run build
Microsheet excel configuration
Step 1: Create folder "DownloadedExcel" at C:\Users<User_name>\DownloadedExcel Step 2: open any new blank excelsheet Step 3:click on file->Options->Custom Ribbon ,click developer option Step 4:Add location :trust Center-> trust center settings->add location <C:\Users<User_name>\DownloadedExcel> Step 5: Copy the sample Excel Micro provided at C:\Users<User_name>\test-automation-ts\sample\InfoQATest.xlsm to C:\Users<User_name>\DownloadedExcel Step 6: Open File from C:\Users<User_name>\DownloadedExcel\InfoQATest.xlsm Step 7: On Application Tab, click on Execute Button and follow instruction on Command Prompt to execute the sample test case
Playwright Reports
npx playwright show-report test\reports netstat -ano | findstr :9323 taskkill /PID 61796 /F taskkill /IM node.exe /F
