Refer the LinkedIn post https://www.linkedin.com/posts/vasu-chiluveru-5b672447_todays-topic-updates-on-20-google-ai-tools-activity-7510929523266486272-V_oV?utm_medium=ios_app&rcm=ACoAAAnlRFoBhVtdYDvHGEkX6Hwx3sHrjtXEc4k&utm_source=social_share_send&utm_campaign=copy_link for more details
Test Automation using Python, Playwright, Selenium and UFT By Vasu Chiluveru
LayoutTitle
Hoverable Dropdown
Wednesday, October 7, 2026
QA - 5 Level career transformation
Transformation from QA Tester to AI Powered Quality Engineer
AI Powered UI & UX Testing for QA
Refer the LinkedIn post https://lnkd.in/p/eAzsVc2k for more details.
Sunday, September 28, 2025
JavaScript Basics for Automation Engineer - A Complete Guide
1. JavaScript Basics for Automation
Even if you’re a Test Automation Engineer, you need to understand the basics of JavaScript.
Core Concepts
-
Variables:
let,const,var -
Data Types: String, Number, Boolean, Object, Array
-
Operators:
+,-,*,/,%,===,!==,&&,|| -
Functions:
function add(a, b) {return a + b;}const multiply = (a, b) => a * b;
-
Conditional Statements:
if,else if,else,switch -
Loops:
for,while,for...of,for...in -
Arrays & Objects:
const arr = [1,2,3];const obj = { name: 'John', age: 25 };
-
DOM Manipulation (if needed for front-end testing):
document.querySelector('button').click();
2. Setting Up Your Automation Environment
Prerequisites
-
Install Node.js (comes with npm)
node -v npm -v -
Install a code editor: VS Code recommended
Create a Project
mkdir automation-projectcd automation-projectnpm init -y
3. Choosing an Automation Framework
There are several frameworks for JavaScript automation:
Popular Frameworks
-
Playwright
-
Modern, cross-browser automation
-
Supports JavaScript/TypeScript
-
-
Puppeteer
-
Headless Chrome automation
-
-
Selenium WebDriver (via WebDriverIO)
-
Traditional, widely used
-
-
Cypress
-
End-to-end testing, developer-friendly
-
We’ll focus on Playwright, which is widely used today.
4. Installing Playwright
npm i -D @playwright/testnpx playwright install@playwright/test– test runner-
npx playwright install– installs browsers (Chromium, Firefox, WebKit)
5. Writing Your First Test
Create a file: example.spec.js
const { test, expect } = require('@playwright/test');test('example test', async ({ page }) => {await page.goto('https://example.com');const title = await page.title();expect(title).toBe('Example Domain');});
Run the test:
npx playwright test
6. Playwright Concepts for Automation
-
Selectors:
page.locator('selector') -
Actions:
click(),fill(),hover(),selectOption() -
Assertions:
expect(locator).toHaveText() -
Waiting:
page.waitForSelector(),await locator.waitFor() -
Screenshots & Videos:
await page.screenshot({ path: 'screenshot.png' });
7. Organizing Tests
-
Page Object Model (POM)
-
Keeps locators and actions in a separate file
-
class LoginPage {constructor(page) {this.page = page;this.username = page.locator('#username');this.password = page.locator('#password');this.loginBtn = page.locator('#login');}async login(user, pass) {await this.username.fill(user);await this.password.fill(pass);await this.loginBtn.click();}}module.exports = LoginPage;
-
Test Suite Structure
/testslogin.spec.js/pageslogin.page.js
8. Integration with CI/CD
-
Run tests in Jenkins/GitHub Actions/GitLab CI
-
Example GitHub Actions workflow:
name: Playwright Testson: [push]jobs:test:runs-on: ubuntu-lateststeps:- uses: actions/checkout@v3- uses: actions/setup-node@v3with:node-version: 20- run: npm install- run: npx playwright install- run: npx playwright test
9. Advanced Automation Topics
-
Parallel Execution
npx playwright test --workers=4
-
Data-Driven Testing
test.each([{ user: 'user1', pass: 'pass1' },{ user: 'user2', pass: 'pass2' }])('login test', async ({ user, pass }) => { ... });
-
Handling Popups/Alerts
page.on('dialog', dialog => dialog.accept());
-
API Testing
const response = await page.request.get('https://api.example.com/data');expect(response.status()).toBe(200);
10. Reporting and Debugging
-
Playwright Reports:
npx playwright test --reporter=html
-
Debug Mode:
npx playwright test --debug
-
Tracing (record test run for debugging):
await page.tracing.start({ screenshots: true, snapshots: true });await page.tracing.stop({ path: 'trace.zip' });
11. Best Practices
-
Use Page Object Model for maintainability.
-
Keep selectors unique and stable.
-
Use explicit waits instead of random sleep.
-
Integrate with CI/CD for automated execution.
-
Use environment variables for sensitive data.
-
Write reusable utility functions for repeated actions.
Git basic commands to work on Git Bash command promt
Steps to use Git commands on the Git Bash command prompt:
1. Create a new folder
2. Right click with mouse on the newly created folder, then you will be prompted with following snap
3. Click on Git Bash Here option
4. Then you will see a new icon displayed on the toolbar as shown below
5. Click on the icon to view the Git Bash window with $ symbol6. Here you go... use the below git commands as per the need
Git commands
|
Task to Perform |
Description |
Git commands |
|
Configure
the user name and email address |
Configure
User name and mail ID in repository |
git config --global
user.name "Vasu Chiluveru" git config --global user.email
vasu@chiluveru.com |
|
Create |
New
local repository |
git init |
|
Checkout |
In
local working directory |
git clone repositoryURL |
|
In
remote working directory |
git clone username@host:repositoryURL |
|
|
Clone
from Branch |
git clone –b <branchname> repositoryURL |
|
|
When
see any SSL issue while cloning |
git config --global http.sslVerify false |
|
|
Add file/files to repository |
Add
one |
git add <filename> |
|
more
files |
git add * |
|
|
Commit |
Commit
changes to Master |
git commit -m "Commit message" |
|
Commit
any files you've added or changed |
git commit -a |
|
|
Push |
Send
changes to the master |
git push origin master |
|
Status |
List
the files that changed |
git status |
|
Connect to a remote |
remote
repository |
git remote add origin
<server> |
|
List
all remote repositories |
git remote -v |
|
|
Branches |
Switch
to new branch |
git checkout -b <branchname> |
|
Switch
between branches |
git checkout <branchname> |
|
|
List
all the branches |
git branch |
|
|
Delete
the branch |
git branch -d <branchname> |
|
|
Push
the branch to origin |
git push origin <branchname> |
|
|
Push
all branches |
git push --all origin |
|
|
Delete
a branch |
git push origin :<branchname> |
|
|
|
1. Fetch and merge
changes |
git pull |
|
2. To merge a different
branch |
git merge <branchname> |
|
|
3. View all the merge
conflicts the source file |
git diff git diff --base <filename> git diff <sourcebranch> <targetbranch> |
|
|
4. After resolve any
conflicts, you mark the changed file |
git add <filename> |
|
|
Tags |
tagging
to mark a significant changeset |
git tag 1.0 <Commit_ID> |
|
Commit_ID
is the leading characters of the changeset ID |
git log |
|
|
Push
all tags to origin |
git push --tags origin |
|
|
|
Have
you mess up, you can replace the changes back |
git checkout --<filename> |
|
To
drop all your local changes and commits, fetch the latest history |
git fetch origin git reset --hard origin/master |
|
|
Search |
Search
the working directory |
git grep "foo()" |
|
Remove |
Remove
any file/s |
git rm /main/src/*.txt |
|
Move
or Rename |
Move
or rename a file |
git mv oldname newname
|
-
Here are the few points on the differences on normal Java & Maven Project 1. Normal Project & Maven Project structu...
-
Background: Estimation helps you to estimate or guess. It provides you an approximate in numeric value; it could be number of person day...
-
Generally, the GUI objects will be identify by the locators id, name, class etc., however it is very difficult to identify the dyna...