Author: rsblogadmin

Authenticate automatically using Json file in Playwright-Java

In this blog we will automatically authenticate by utilizing a Json file within Playwright-Java for seamless verification.  Topics that we will cover: Automate simple login scenario Store login authentication steps in json file Use json file to authenticate login functionality Source code (login using playwright) Source code (generate json) Source code (using json to automatically […]

Emulate/Mock GEO Locations using Playwright Java

In this blog we will learn about how to mock/emulate geo locations using playwright java.  Topics that we will cover: Mock geo location using Playwright-Java for kfc website Mock geo location using Playwright-Java for whatmylocation website Source code Mock geo location using Playwright-Java for kfc website To explore this concept, go to https://locations.kfc.com/ This website […]

‘Trace Viewer’ tool and ‘Recording’ using Inspector in Playwright-Java

In this blog we are going to see the ‘Trace Viewer’ feature in Playwright-Java. Using this tool users we can capture before/after screenshots. We will also see the usage of playwright inspector to effectively record actions.  Topics that we will cover: Recording actions using Playwright-Java Viewing the trace (recorded actions) Source code Recording actions using […]

Maximize browser window using Playwright Java

In this blog we will utilize Playwright Java to maximize the browser window using 2 methods.  Topics that we will cover: Maximize browser window (Viewportsize method) Maximize browser window (argument method)  Source code (Viewportsize) Source code (argument) Maximize browser window (Viewportsize method) Let us run below piece of code  Notice below that the browser is […]

Leverage Playwright Java to access the element using its Nth index

In this blog we will utilize Playwright Java to locate and retrieve the Nth element within a given context.  Topics that we will cover: Identify Nth element and populate data (positive indexing) Negative indexing  Source code Identify Nth element and populate data (positive indexing) Go to https://rahulshettyacademy.com/angularpractice/    We can see 3 input text fields […]

File Download using Playwright Java

In this blog we will utilize playwright-java to download a file and save it at temporary as well as specific location.  Topics that we will cover: File download at default/temporary location File download at specific desired location (inside playwright project) File download example from chromedriver storage Source code (default download path) Source code (specific download […]

Upload file using Playwright Java

In this blog we will utilize playwright-java to dynamically generate and upload a fresh file at runtime. We will also learn to upload multiple files. Topics that we will cover: Upload existing file Generating and uploading a fresh file dynamically during runtime Upload multiple files Source code (upload existing file) Source code (create/upload file during […]

Create and validate POST request using Playwright Java

In this blog we will learn about POST Request (API Testing) using Playwright Java. Topics that we will cover: Create a Post Request using playwright Learn how to parse json Sample Post Request (Register successful, 200) Sample Post Request (Login unsuccessful, 400) Source code (Post a new user and parse json) Source code (register successful) […]

Keypress feature and introduction to API testing in Playwright Java

In this blog we will be discovering the Keypress Functionality and will get started with API Testing in Playwright Java.  Topics that we will cover: Keypress feature Automate GET Request for status code 200 Automate GET Request for status code 404 Source code (keypress) Source code (GET Request status code 200) Source code (GET Request […]

Utilize the hover and click command in Playwright Java

In this blog, we will see how to perform a hover action on an element using Playwright Java. We will also see a different approach to click on the text hyperlink. Topics that we will cover: Alternate approach to click the link Hover an element Source code (click) Source code (hover) Alternate approach to click […]