
Explore prerequisites for the advanced Selenium WebDriver course with Java and TestNG, including Maven and Eclipse, plus key concepts like locators, waits, before/after annotations, common test failures, and six-part framework.
Plan for this course outlines automating tests for a single web app using Selenium WebDriver, building a growing, structured test automation project with grouped tests to reflect real-world practices.
Walks through the course starting point code, outlining Java and Maven setup and configuration. Demonstrates a selenium login test framework with setup, teardown, and tests running in Chrome and Firefox.
Develop a professional full stack test automation framework with comprehensive documentation, rigorous testing, and production-grade quality, never trust the test, and support web, mobile, desktop, and api across platforms.
Improve test maintainability by adopting a base test class and browser driver factory, implementing a page object model, and using data driven tests with spreadsheets to organize tests and suites.
Explore how Java packages organize a large test automation framework, improve efficiency, prevent name conflicts, and support access control while refactoring login page tests and updating suites.
Create a base test class to centralize webdriver setup and teardown, so tests extend it and duplication is eliminated, with before/after annotations and maintained setup.
Create a dedicated test utilities class for reusable helper methods and extend tests from it. Use a static sleep for demonstration, but prefer explicit waits with expected conditions.
Implement a browser driver factory to centralize browser creation and enable parallel test execution. Select Chrome or Firefox, set properties, return a driver, and support grid and cloud environments.
Run Selenium tests in parallel using a thread-safe browser driver factory, enabling four tests to execute concurrently on the test and documentation website, with logs showing simultaneous starts.
Improve test output in parallel selenium tests by integrating log4j for better console logging, configuring maven dependencies and a log4j2.xml pattern to print test names, time, and thread information.
Explore the page object model, a design pattern where each page becomes a class with locators and methods. It enables reusable actions and easy maintenance when the UI changes.
Explore page factory within the page object model for Selenium, using find by annotation and init elements, and why dynamic pages can break such setups.
Create page objects for welcome, login, and secure area pages using a driver and logger; open welcome page, click form authentication, and implement a login method returning secure area.
Finish the secure area page by performing test verifications, not in the page object; verify url via a base page method, and check logout button visibility and the success message.
Complete all page objects in the selenium suite by adding a public get current url method, defining the secure area url, and implementing logout visibility and success message checks.
Learn to implement page objects in tests by creating welcome, login, and secure area pages, replacing direct element calls, and validating URL, logout visibility, and login success messages.
Apply page object design to the negative login test, add a separate login method for negative flows, and return the error message on the login page instead of navigating away.
Run a negative login test with Selenium using page objects, including waiting for and validating the error message, with all tests finishing zero failures.
Organize the page object model by creating a separate header page object, letting pages extend header or the base page object, and treat join waiting list popup as a dialog.
Master advanced Selenium interactions by checking checkboxes and selecting radio buttons, building page objects, and verifying that all checkboxes are selected across the test scenario.
Learn to automate dropdowns in selenium with java and testng, using the select class to pick by value, visible text, or index and verify the selected option.
Practice handling browser alerts in selenium by creating tests for js alert, js dismiss, and js prompt; interact with alerts (get text, send keys, accept, dismiss) and verify results.
Learn to switch focus to a new window or tab in Selenium, open a new window via a link, switch by title, and verify the page source.
Learn to automate iframe handling in Selenium with Java and TestNG by switching to the iframe, accessing the TinyMCE editor, and validating its default text.
Learn to press keyboard keys in Selenium tests using send keys on the page body or the Actions class, and verify messages like you entered enter.
Explore how the JavaScript executor runs JavaScript via selenium web driver to click when normal clicks fail, generate alerts, refresh pages, and scroll the page.
Master scrolling techniques in selenium using JavaScript executor to scroll to bottom, scroll by coordinates, and bring elements into view.
Demonstrates drag and drop with webdriver using action class and a JavaScript executor, swapping column A and B and verifying headers in Chrome and Firefox.
Master hover over interactions in Selenium WebDriver with Java and TestNG by revealing and clicking the view profile link under avatars, using the actions class move to element.
Automate slider testing in selenium by moving a horizontal slider to 3.5 using a 0.5 step with a right-arrow for-loop workaround, then verify the page shows the same value.
Master a data driven test framework that stores test data separately, enabling one login test to run with multiple user profiles via a data provider, boosting flexibility and maintainability.
Learn how to pass external input in TestNG using parameters, configure suite and test level values, and run simple data-driven like tests with negative login scenarios.
Master data driven testing with TestNG data providers by using a method that returns an array of object arrays and a data provider annotation to run test across data sets.
Convert a test to a data driven approach by implementing a static data provider in TestNG that returns an array of arrays of objects for three file types.
Create a data provider from a spreadsheet to drive a single negative login test, using a CSV file to cover empty and invalid usernames and passwords with expected messages.
Add a maven csv dependency and implement a data provider that reads csv headers and rows, builds key-value maps, and returns an iterator to feed tests.
Leverage a CSV data provider to drive TestNG tests with Selenium WebDriver, reading test data from a CSV into maps and executing multiple scenarios in Chrome.
Learn how to replace hard assertions with soft assertions using the soft assert class in TestNG, enabling tests to continue after failures. Use assertAll at the end to report failures.
Capture robust screenshots with selenium by implementing a takeScreenshot method that saves dated, uniquely named PNG files under a structured test output path, using Apache Commons IO.
Learn to verify JavaScript errors in a web page using Selenium by inspecting browser console logs, extracting log entries, and failing the test on severe errors like uncaught TypeError.
Explore implementing a TestNG test listener to modify test behavior, log test start, success, and failure using a logger, and attach it via suite, class, or annotation.
Explore how to read selenium test reports with TestNG, including the default index.html. Implement test listeners and reporters to surface assertion errors and failures in terminal and Jenkins.
Learn to access and manipulate site cookies with Selenium WebDriver: create and set cookies, retrieve values by name, and print them during a login test.
Start tests with a preloaded Chrome profile to preserve cookies, login state, and extensions by copying a Chrome profile into project resources, renaming to default, and launching Chrome with options.
Test a web app on mobile using chrome dev tools mobile emulation to simulate iPhone and iPad, and run Selenium tests with a chrome driver configured for device emulation.
Explore running tests in headless browsers with Chrome headless and Firefox headless, add HtmlUnit and PhantomJS support, and understand practical considerations for real vs headless browser testing.
Be guided to maximize discounts with a current month-year coupon and resource links; access a free XPath cheat sheet via the newsletter, and connect on LinkedIn.
Double your QA salary with Test Automation using Java and Selenium Webdriver! Become SDET!
Advanced Selenium WebDriver with Java and TestNG course is for people who already know some basics of automation testing with selenium webdriver, and want to improve their test automation and Selenium WebDriver knowledge and be able to build a cool and easy maintainable test framework with Java and TestNG.
There are many Selenium tutorials, that teach you to do advanced tasks with Selenium, and handle WebDriver exceptions, but few can show you the structure of the Advanced Full-Stack Selenium WebDriver automation testing framework.
This "Advanced Selenium WebDriver with Java and TestNG" is basically a continuation of my Highest Rated "Selenium WebDriver tutorial for beginners" course where students learned some selenium webdriver basics with Java and TestNG.
Students do not have to finish the "Selenium WebDriver tutorial for beginners" course but need to know how to use Selenium WebDriver with Java to automate simple test cases. Knowledge of TestNG is a plus.
During the "Advanced Selenium WebDriver with Java and TestNG" course, we will be automating the testing of one web application, as you would do at your work. In the end, students will have a real-world example of a full-stack test automation framework, that will include data driven testing framework and a page object model.
A full-stack selenium test automation framework, developed during this course, could be used as a base for your real job test automation framework. You will not have to build anything from scratch again, just use the already created advanced framework, to add new automated tests for your application under test.
The framework will include:
Browser Driver Factory for easy parallel test execution
Data-Driven Test Framework for test data from spreadsheets
Page Object Model implementation
Test utilities for Taking screenshots, capturing JS console errors, etc
Advanced Selenium WebDriver Interactions