Who Is This Course For?
This course is designed for engineers who have completed a core Selenium with Java course and are ready to work at a professional, enterprise level. You will build a complete Automation Framework integrating advanced TestNG features, multiple design patterns, Selenium Grid, Docker, Jenkins CI/CD, and a real-world project — the way top QA teams actually work.
- Full annotation lifecycle —
@BeforeSuite,@BeforeTest,@BeforeClass,@BeforeMethod,@AfterMethod,@AfterClass,@AfterSuite invocationCount— running a test method multiple times; constraints and valid use casespriority— default value 0; negative values allowed; alphabetical tie-breakingdependsOnMethods— precedence overprioritywhen both are setenabled=falsevsalwaysRun=true— controlling test skipping within groups- Master suite XML — combining multiple
testng.xmlfiles into one run using<suite-files>
Object[]— single-parameter dataset;Object[][]— multi-row multi-column datasetIterator<Object[]>— lazy loading for large datasets without loading everything into memory- Why
Mapis not a valid@DataProviderreturn type
AssertvsSoftAssert— fail-fast vs. collect-all-failures strategy@Test(groups)— smoke, regression, sanity; running specific groups fromtestng.xml@Parameters— passing values fromtestng.xmlinto test methods at runtime@Factory— dynamically generating multiple test class instances from a single class- Running TestNG programmatically via
TestNGandXmlSuiteclasses — no XML needed
- What Dependency Injection means — providing objects to a class rather than letting it create them
- Injecting
WebDriverinto test classes via constructor or method parameters java.lang.Class,java.lang.reflect.Method— inspecting and invoking methods at runtime- Running test methods programmatically using reflection — no hardcoded test names
- Writing test results back to an Excel file after each test via injected utility classes
- DI vs. static
WebDriver— when to use each approach in real projects
IRetryAnalyzer & Screenshot on Failure
IRetryAnalyzer— implementingretry(ITestResult)to auto-re-run failed tests up to a configurable limitITestListener— hooking intoonTestFailure(),onTestStart(),onTestSuccess()lifecycle events- Taking a screenshot on failure using
ITestResult+TakesScreenshot+FileUtils.copyFile() - Attaching failure screenshots automatically to
ExtentReportsviaBase64encoding Reporter.log()— adding custom step messages visible in the TestNG HTML report- Registering listeners via
@Listenersannotation or the<listeners>block intestng.xml
- Private constructor + static method = one
WebDriverinstance for the entire test run - Preventing multiple browser launches when multiple test classes initialize the driver
DriverFactoryclass — returningChromeDriver,FirefoxDriver, orEdgeDriverbased on input parameter- Removing browser-specific
if-elselogic from individual test classes
- Selenium 3 —
EventFiringWebDriver+ implementingWebDriverEventListener - Selenium 4 —
EventFiringDecoratorwrappingWebDriver+WebDriverListenerinterface - Logging every
click(),navigate().to(), and exception automatically through the listener - Choosing between
extends AbstractWebDriverEventListenervs.implements WebDriverListener
@FindBy, @FindAll, @CacheLookup
@FindBy— declaringWebElementandList<WebElement>fields, initialized viaPageFactory.initElements(driver, this)@FindAll— locating elements matching any of multiple locators (OR logic)@FindBys— locating elements matching all of multiple locators (AND / parent-child chaining)@CacheLookup— caching the element reference after the first DOM lookup to improve performance- When
@CacheLookuphelps vs. when it breaks — dynamic elements, page refresh, AJAX updates - Comparing
@FindAllvs@FindBys— logic difference and when to use each in real tests
TakesScreenshot, AShot & Robot
TakesScreenshot— castingWebDriverand callinggetScreenshotAs(OutputType.FILE)for full-page capture- Saving screenshots with
FileUtils.copyFile()using timestamped filenames to avoid overwriting WebElement.getScreenshotAs()— capturing just a specific element on the page (Selenium 4)AShotlibrary — full-page screenshots including content below the visible foldRobotclass (java.awt.Robot) — OS-level desktop screenshot usingcreateScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()))- Capturing screenshots on failure via
ITestListener.onTestFailure(ITestResult)— no test-level code needed
- Casting
WebDrivertoJavascriptExecutorand callingexecuteScript(String, Object...) - Scrolling by pixel:
window.scrollBy(0, 500); scrolling to element:arguments[0].scrollIntoView() - Clicking elements that
WebElement.click()cannot reach:arguments[0].click() - Setting input values via JS:
arguments[0].value='text'for blocked input fields - Reading values:
return arguments[0].value/return arguments[0].textContent - Limitations — bypasses user interaction validation; use carefully in real automation
Robot.mouseMove(x, y),mousePress(InputEvent.BUTTON1_DOWN_MASK),mouseRelease()Robot.keyPress(KeyEvent.VK_ENTER)— keyboard simulation at OS level- Handling Windows file upload dialogs and OS pop-ups that Selenium cannot touch
- Combining with
StringSelectionandToolkit.getDefaultToolkit().getSystemClipboard()for clipboard operations
- Setting up
ExtentSparkReporterandExtentReportsinstance in a base class or listener - Creating
ExtentTestnodes per test and logging.pass(),.fail(),.skip()with messages - Attaching
Base64-encoded screenshots to reports on failure - Integrating with
ITestListenerfor automatic lifecycle-driven reporting - Flushing reports at end of suite with
extent.flush()
log4j2.xml/log4j.properties— configuringConsoleAppender,FileAppender, and log patternsLogManager.getLogger(ClassName.class)— logging atDEBUG,INFO,WARN,ERRORlevelsReporter.log()— embedding step-level messages directly into the TestNG HTML reportReporter.getOutput(ITestResult)— reading Reporter messages to attach to ExtentReport
XSSFWorkbook,XSSFSheet,XSSFRow,XSSFCell— reading and writing.xlsxfiles- Converting Excel rows to
Map<String, String>for use in@DataProvider - Writing test results (Pass/Fail/timestamp) back to Excel after each run
java.util.Properties— loading key-value config (base URL, credentials) from.propertiesfiles- Apache Commons CSV — parsing CSV files into row/column collections for test data
- JSON data types — objects, arrays, strings, numbers, booleans, null
- Parsing JSON with
JSONObject/JSONArrayor REST Assured'sJsonPath - Connecting to MySQL using
java.sql.DriverManager.getConnection(url, user, pass) Statement,PreparedStatement,ResultSet— querying DB and comparing values to UI output
- Running
mvn testfrom the terminal — no IDE open, no manual steps - Passing parameters via
-Dsystem properties:mvn test -Dbrowser=chrome -Denv=staging - Reading
System.getProperty("browser")inside test code and insidetestng.xmlusing${browser} - Selecting specific TestNG suites via
maven-surefire-plugin<suiteXmlFile>config - Running a single test class or method:
mvn -Dtest=LoginTest#verifyLogin test - Full parameter chain: Jenkins build param →
pom.xml→testng.xml→@Parameters→ test method
- Standalone mode — single-node Grid using
java -jar selenium-server.jar standalone - Hub & Node — registering remote machines to a central Hub for distributed execution
- Connecting via
RemoteWebDriverusing Hub URL andChromeOptions/FirefoxOptions - Parallel execution in
testng.xmlusingparallel="tests"andthread-count - Thread-safe driver management using
ThreadLocal<WebDriver>to avoid cross-thread interference
- Configuring
RemoteWebDriverwith SauceLabs remote Hub URL and access credentials - Setting browser, OS version, and screen resolution via
MutableCapabilities/sauce:options - Viewing live test execution and video recordings in the SauceLabs web dashboard
- Docker core concepts — images, containers, ports, volumes;
docker pull,docker run,docker ps - Pulling Selenium's official images:
selenium/standalone-chrome,selenium/standalone-firefox - Connecting
RemoteWebDriverto a containerized browser onhttp://localhost:4444 - Watching tests visually inside containers using VNC Viewer (port
5900) - Running Selenium Hub + Node in separate containers and linking them via Docker network
- Running parallel browser containers for cross-browser execution without local installs
docker stop/docker rm— cleaning up environments after test runs
- Installing Jenkins locally and configuring the Maven plugin and JDK settings
- Creating a Freestyle job — pointing to a Git repo and triggering
mvn test - Parameterized builds — adding
String ParameterandChoice Parameterfor browser, env, suite - Passing Jenkins build parameters into Maven via
-D${browser}in the goals field - HTML Publisher plugin — publishing
ExtentReportsHTML inside Jenkins after each run - Post-build email notifications — configuring SMTP and dynamic report-link emails
- Build triggers — manual, schedule (cron), and upstream job chaining
- What keyword-driven testing is — separating action keywords from test data in an Excel file
- Excel test case structure — columns for Keyword, Locator Type, Locator Value, Test Data
- Building a
KeywordExecutor/ActionEngineusing reflection or aswitchstatement
- Reading test steps from Excel row by row using
XSSFWorkbook/XSSFRow - Implementing
WebUtilhelper methods:clickElement(),typeText(),verifyText(),navigateTo() - Dispatching the correct method based on the keyword value read from Excel
- Adding new test cases entirely in Excel — zero Java code changes required
- Logging each keyword action to
ExtentReportsfor full traceability
- Automating a real Point-of-Sale (POS) web application — login, products, orders, billing
- Applying all course components: TestNG, POM with
@FindBy,ExtentReports,Log4J, Excel data, Jenkins CI/CD - Jira — creating test cases, logging bugs with screenshots, tracking sprint progress
- Debugging real failures — identifying whether the issue is in the app, framework, or locator
- Code review — refactoring for readability, removing duplication, improving structure
Explain Singleton, Factory, Decorator with real code examples from your own project
Walk through your package structure, layer responsibilities, and why each design decision was made
Describe the full chain: Jenkins → pom.xml → testng.xml → @Parameters → test method
Explain ThreadLocal<WebDriver> and how you prevented driver conflicts across parallel threads
Compare Excel, JSON, Properties, MySQL — and justify where you used each in the project
Describe how you used Docker containers as browser nodes and ran tests without installing browsers locally