Category: Java

Understand Explicit timeout in Playwright Java

In this blog, we will study Playwright Java’s ability to set a timeout explicitly for actions. Topics that we will cover: Playwright Java’s explicit timeout for specific actions  Source code Playwright Java’s explicit timeout for specific actions  We have already seen setting up of global default timeout. We will examine the procedure for establishing an […]

Timeouts in Playwright Java

In this blog, we will customize and set the default global timeouts in Playwright Java to suit our needs.  Topics that we will cover: Playwright Java’s Default Global Timeouts Personalized timeout Source code Playwright Java’s Default Global Timeouts Explore the official webpage that specifically focuses on explaining the different Timeouts in Playwright https://playwright.dev/docs/test-timeouts  Below, it […]

Utilize Playwright-Java to interact with dropdown menus

In this blog we will leverage the power of Playwright-Java to seamlessly interact with dropdown menus. Topics that we will cover: select by value (example 1, method 1) select by value (method 2) select by value (example 2) select by text select by index Soure code select by value (example 1, method 1) Go to […]

Playwright-Java’s ‘text’ locator and usage of first() and last() method

In this blog, we will study about Playwright-Java’s locators that provide a powerful way to identify elements on a web page, enhancing automation capabilities.  Topics that we will cover: Locating visible text content using ‘text’ locator Locating element using the first() function Locating element using the last() function Source code (locator method) Source code (locator […]

Playwright-Java’s ‘Record’ capability

In this blog, we will learn about Playwright-Java’s ‘Record’ capability that enables users to create scripts by recording their actions on a web page, making it a convenient tool for test automation. Topics that we will cover: ‘Record’ capability in Playwright-Java Source code (before Record operation) Source code (after Record operation) ‘Record’ capability in Playwright-Java  […]

Inspector feature and initiate the opening of numerous browser tabs with Playwright-Java

In this blog, we will explore the utilization of the ‘Pause’ feature and the Playwright Inspector. Additionally, we will look into the concept of managing multiple browser pages or tabs using a single browser instance. Topics that we will cover: ‘Pause’ feature alongwith Playwright Inspector Utilizing a single instance of a browser to open and […]

Launch Chromium, Mozilla, Webkit, Chrome, Edge browsers using Playwright-Java

In this blog, you will gain knowledge on how to launch various browsers such as Chromium, Mozilla Firefox, Webkit, Chrome, and Microsoft Edge using Playwright-Java. Topics that we will cover: Launch chromium browser (in header mode) using playwright Launch firefox browser using playwright Launch webkit browser using playwright Launch chrome browser using playwright Launch Microsoft […]

Write and run the first Playwright-Java Test

In this blog post, you will learn how to create the first playwright-Java test, execute the test and optimise the code. Topics that we will cover: Create playwright java program Execute the first Playwright Test Refactor (refine) the code Source code (without refactoring) Source code (with refactoring) Create playwright java program  Create a simple java […]

Playwright Java setup in Eclipse IDE

In this blog, you will learn how to create a Playwright Java project in the Eclipse IDE. You will also learn how to add the maven dependencies such as: Junit jupiter, Junit jupiter params, Junit playwright and JUnit Jupiter Engine. Additionally, you will configure JavaSE-1-1.8 and create a Java maven playwright project in eclipse. Topics […]

Java alert popups and prompt

1. Java alerts/popups handling using Selenium WD (getText(), accept() methods)2. Another example of JS Alert3. Example of JS Confirm4. Example of JS Prompt Java alerts/popups handling using Selenium WD (getText(), accept() methods) Launch Scroll at the page bottom. You will see ‘Display’ section having ‘Confirmation Alert’ button Click ‘Confirmation Alert’ button to popup a message […]