Author: rsblogadmin

Allure Report generation using Playwright Java

In this blog we will be utilizing Playwright Java to generate allure reports. Topics that we will cover: Add aspectj version in the properties section of pom.xml Add 3 properties in the properties section of pom.xml Add maven allure testng dependency Add ‘aspectjweaver’ setting in pom.xml Maven install Run any sample testng test Manually install […]

Handle ‘double click’, ‘drag and drop’ using Playwright Java

In this blog we will be utilizing Playwright Java to handle double click, drag and drop. Topics that we will cover: Handle double click Handle drag and drop Source code (double click) Source code (drag and drop) Handle ‘double click’ To understand double click, go to https://api.jquery.com/dblclick/   As can be seen above, there is a […]

Gestures (Slider, Resizable elements) in Playwright Java

In this blog we will be utilizing Playwright Java to handle gestures. Topics that we will cover: Handle sliders Handle resizable element Source code (slider) Source code (resizable) Handle sliders To understand sliders, go to https://jqueryui.com/resources/demos/slider/default.html    As can be seen above, there is a slider that we can move to right and left on […]

Create TestNg Test using Playwright Java

In this blog we will be utilizing Playwright Java to create a TestNg Test. Topics that we will cover: Add TestNG maven dependency Create TestNG test Source code Add TestNG maven dependency We start by adding TestNg dependency in pom.xml Navigate to below site  https://mvnrepository.com/artifact/org.testng/testng    Paste in pom.xml file  Note: The dependency (see below) […]

Handling frames in Playwright Java

In this blog we will be utilizing Playwright Java to handle frames. Topics that we will cover: Fundamental overview of frames Handle frames Source code Fundamental overview of frames  A frame refers to an HTML page that is inserted into another page.  Launch https://paytm.com/ and hit ‘Sign In’ button   A distinct window pops up […]

Javascript dialogs handling using Playwright Java

In this blog we will be utilizing Playwright Java to handle javascript dialogs (alerts, popups, prompts). Topics that we will cover: Handle Javascript dialogs (example 1) Handle Javascript dialogs (example 2) Source code (example 1) Source code (example 2) Handle Javascript dialogs (example 1) Go to https://the-internet.herokuapp.com/javascript_alerts  To handle this, we can add “onDialog” listener […]

Launch Non-Incognito Browser Windows using Playwright Java

In this blog we will be utilizing Playwright Java to launch non-incognito browser windows. Topics that we will cover: Launch browser in incognito (private) mode Launch Non-Incognito (normal) Chromium Browser Launch Non-Incognito Chrome Browser Launch Non-Incognito Chrome Browser Default Profile Source code (incognito mode) Source code (Non-Incognito Chromium Browser) Source code (Non-Incognito Chrome Browser) Source […]

Data Driven Testing using Playwright Java

In this blog we will be utilizing Playwright Java for the execution of Data Driven Testing with ease. Topics that we will cover: Parameterize Test using dataProvider in same file Parameterize Test using dataProvider in separate file Source code (dataProvider in same file) Source code (dataProvider in different file) Source code (external dataProvider) Parameterize Test […]

Take Screenshot and capture video using Playwright Java

In this blog we are going to see how to take screenshot and capture video using Playwright Java.  Topics that we will cover: Take screenshot of a page  Take screenshot of an element Capture video Source code (page screenshot) Source code (element screenshot) Source code (video capture) Take screenshot of a page Let us say […]

Browser based Authentication and handling shadow root elements in Playwright Java

In this blog we will see how Playwright Java enables browser-based authentication and provides the capability to handle shadow root elements.  Topics that we will cover: Handle browser based authentication Handle Shadow root elements Source code (browser based auth) Source code (shadow root) Handle browser based authentication Navigate to https://the-internet.herokuapp.com/  You would see   Notice […]