
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Explore the open-source Playwright code and the public Java repository to dive into the code, review open issues and pull requests, and recognize Microsoft maintains Playwright.
Configure the Java development kit (JDK) on your machine, download version 21 for Windows, mac, or Linux, set JAVA_HOME and PATH, and verify with java -version for Jenkins compatibility.
Explore Java control flow with conditional statements and loops, mastering if-else and switch constructs to output messages for positive, negative, and zero values.
Streamline Java projects with Maven by managing dependencies in pom.xml, exploring the project structure, and using lifecycles like clean and compile while adding Playwright for Java.
Create a simple Java program using the JDK’s built-in Scanner to read two numbers and print their sum, avoiding external libraries.
Explore essential java libraries, including apache commons and google guava, add them via the maven pom.xml, pull dependencies from the maven repository, and run practical string and collection exercises.
Explore using external Java libraries like Apache Commons and Google Guava through Maven dependencies to add string utilities, validate emptiness, reverse strings, and join strings with Joiner.
Leverage cucumber and gherkin to capture a positive contact us scenario on the contact us page, mapping steps with given, when, and then in a feature file for automation.
Create a cucumber runner class to configure and run tests, enabling reports. Point features and glue paths with cucumber options and extend an abstract class for a robust setup.
Learn to navigate new browser tabs in Playwright with cucumber, switch to the most recent tab, wait for pages, and share state across steps using hooks.
Create a browser manager to centralize Playwright setup and teardown, enabling shared browser context and page state across steps while applying the dry principle.
Review how to create feature files with given when then, map steps to playwright actions, and use runner, hooks, and a browser manager with pico container for dependency injection.
Explore cucumber regular expressions to drive data in scenarios by using parameter types such as string and integer, and pass specific data into the WebDriver University contact us form.
Explore generating random data with Data Faker in a Java cucumber BDD project, including adding the Data Faker dependency to pom.xml and using random names and emails in steps.
Implement random data generation in cucumber steps using data faker by initializing a faker instance and invoking name.firstName, name.lastName, and internet.emailAddress to populate test inputs.
Discover how to create and leverage scenario outlines in cucumber for the contact us page on WebDriver University. Learn to define outlines, use examples, and reuse steps across scenarios.
Map and implement cucumber scenario outlines with an examples table in a Java Playwright BDD workflow, covering first name and email steps across three scenarios.
Map and implement dynamic steps for scenario outlines, validating success and error messages using a dynamic xpath, extracting text from h1 or body elements, and asserting with test ng.
Apply the background keyword to define preconditions, reduce code duplication with the dry principle, and move repeated steps into a shared background for all scenarios.
Create a login feature file within your automation framework, using a feature keyword and scenario outline to validate valid and invalid credentials for the WebDriver University login portal.
Map out Cucumber scenario requirements for a login portal, using a scenario outline, parameterized steps for username and password, and expected alert validation to drive reusable step definitions.
Implement and validate alert handling in Cucumber with Playwright by capturing the alert text via the dialog event, accepting the alert, and asserting it matches the expected message.
Learn to use cucumber tags to control scenario execution across feature files, using the at symbol, top-of-file tags like regression and smoke, with practical multi-file examples.
Learn how to use and combine tags like regression, contact, login and smoke in cucumber bdd with java, through real-world examples and runner configurations to target specific scenario groups.
This course uses the latest versions of Playwright & Cucumber BDD.
Why Playwright?
Playwright is a multi-programming language end-to-end testing framework that is not only popular but also rapidly growing in popularity due to its outstanding features and ease of use.
Why Cucumber BDD?
Cucumber BDD (Behaviour-driven development) much like 'Playwright' is a technology which is growing in popularity by the day and is used by organisations across the globe. Cucumber BDD captures test requirements in a simplistic manner, making it easy not only for 'Non technical parties/people' to understand scenario's which have been automated, but also assists the process of building effective automation frameworks and tests.
Why this course?
This course is designed to be quick, effective, efficient and easy to follow. I have been teaching for several years on Udemy with over 9 highly successful courses to date. I have refined this course using proven teaching techniques. This course is carefully structured from start to finish and I provide downloadable code examples after each coding lecture.
What does this course cover?
Introduction to Playwright, Cucumber, and Java:
Learn how to rapidly create both simplistic and sophisticated automated UI tests using Playwright.
Understand the importance of Cucumber BDD (Behaviour-Driven Development).
Capture test (scenario) requirements effectively and effortlessly using Cucumber BDD.
Gain knowledge of ‘Gherkin’, Cucumber’s language parser.
Know why and when to use specific Gherkin keywords such as ‘Feature’, ‘Given’, ‘When’, ‘And’, ‘Then’, and more!
Learn the differences between ‘Scenarios’ and ‘Scenario Outlines’.
Simplify tests using specific Cucumber BDD features such as the ‘Background’ keyword.
Insert and modify test data directly within feature files.
Correctly map test requirements to actions using Cucumber step definitions and Playwright.
Become familiar with ‘Tags’ and learn how to target and execute specific tests (scenarios).
Programming and Tools:
Learn Java & Maven to enhance your testing capabilities.
Understand the fundamentals of Java and how it integrates with Playwright.
Manage project dependencies and build automation effectively using Maven.
Utilize Playwright for browser automation tasks.
Advanced Testing Techniques:
Understand the importance of design patterns such as Page Object Modelling (POM).
Learn best practices such as DRY (Don’t Repeat Yourself).
Leverage ‘Hooks’ and ‘Custom Commands’.
Reporting and Continuous Integration:
Create sophisticated reports (HTML reports, JSON reports) and more!
Learn continuous integration using Jenkins and understand its usefulness.
Become familiar with important add-ons for Jenkins.
Create visually appealing reports within Jenkins and attach images to those reports.
Handle extensible choice parameters (selection dropdown lists) via Jenkins.
Additional Features:
And much, much more!
Ready to automate your tests like a pro!