Who Is This Course For?
This course is designed for manual testers looking to move into automation, freshers who want to build a career in QA, and anyone who wants to learn Selenium with Java from the ground up. You will work with the same tools and frameworks used in real software companies — and leave with a project-ready portfolio.
- Installing Java JDK, Eclipse IDE, and configuring environment variables
- Creating a Maven project and understanding
pom.xmlstructure - Adding Selenium WebDriver dependency via Maven Central
- Setting up ChromeDriver, GeckoDriver (Firefox), and EdgeDriver
- Understanding the Selenium architecture — how WebDriver communicates with browsers
- Instantiating
WebDriverfor Chrome, Firefox, and Edge browsers - Writing and running your first automation script end-to-end
- Understanding the difference between Selenium 3 and Selenium 4
driver.get()anddriver.navigate().to()— loading URLsnavigate().back(),navigate().forward(),navigate().refresh()driver.manage().window().maximize(),setSize(),setPosition()driver.getTitle()anddriver.getCurrentUrl()for page verificationdriver.quit()vsdriver.close()— when to use each
By.id— fastest and most reliable when availableBy.name— using the HTML name attributeBy.className— single CSS class targetingBy.tagName— selecting by HTML element typeBy.linkText— exact anchor text matchingBy.partialLinkText— partial anchor text matchingBy.cssSelector— powerful CSS-based targetingBy.xpath— most flexible, works anywhere in the DOM
- Choosing the right locator for stability and maintainability
- Using browser DevTools to inspect and validate locators
- Avoiding brittle locators that break with minor UI changes
- Tag, ID, class, and attribute-based CSS selectors
- Combining multiple attributes:
input[type='text'][name='email'] - Child and descendant selectors, sibling selectors
:nth-child(),^=,$=,*=— starts-with, ends-with, contains patterns
- Absolute XPath vs Relative XPath — differences and when to use each
- XPath with attributes:
//tag[@attribute='value'] contains(),starts-with(),text()functions- XPath axes:
parent,child,following-sibling,preceding-sibling,ancestor - Grouping and index-based XPath:
(//tag)[2] - AND / OR logical operators in XPath expressions
sendKeys()— typing into text fields and input boxesclick()— clicking buttons, links, checkboxes, and radio buttonsclear()— clearing existing text from input fieldssubmit()— submitting forms directly
isSelected()— checking state of checkboxes and radio buttonsisEnabled()— verifying if a field or button is activeisDisplayed()— checking if an element is visible on screengetText()— reading the visible text of any elementgetAttribute()— reading any HTML attribute valuegetCssValue()— reading applied CSS property values
moveToElement()— hovering over menus and tooltipsdoubleClick()andcontextClick()(right-click)dragAndDrop()anddragAndDropBy()- Keyboard actions:
keyDown(Keys.SHIFT),keyUp(),sendKeys(Keys.ENTER) - Scroll actions using
scrollToElement()andscrollByAmount()(Selenium 4) build().perform()— chaining and executing action sequences
TakesScreenshotinterface — full-page screenshot on test failure- Element-level screenshot using
WebElement.getScreenshotAs() - AShot library — for full-page scrolling screenshots
- JavaScript Executor-based screenshot approach
driver.getWindowHandle()— capturing the current window referencedriver.getWindowHandles()— getting all open window/tab referencesdriver.switchTo().window(handle)— switching between windows and tabs- Opening a new tab using Selenium 4's
newWindow(WindowType.TAB) - Closing child windows and returning to the parent window
driver.switchTo().frame()— switching by index, name, or WebElementdriver.switchTo().defaultContent()— returning to the main pagedriver.switchTo().alert()— handling JavaScript alerts and confirmsalert.accept(),alert.dismiss(), andalert.sendKeys()
- Importing and using the
Selectclass from Selenium support selectByVisibleText(),selectByValue(),selectByIndex()getOptions(),getAllSelectedOptions(),getFirstSelectedOption()- Handling multi-select dropdowns with
deselectAll()
driver.findElements()— returning aList<WebElement>- Iterating over element lists to validate data or perform bulk actions
- Counting elements, checking presence, filtering by state
Thread.sleep()— static wait (why it should be avoided in real scripts)driver.manage().timeouts().implicitlyWait()— global element search timeoutWebDriverWaitwithExpectedConditions— explicit conditional waits- Key conditions:
visibilityOfElementLocated,elementToBeClickable,textToBePresentInElement,alertIsPresent FluentWait— polling interval, custom timeout, ignoring exceptions- Choosing the right wait strategy for different application behaviours
- Why POM exists — separation of page logic from test logic
- Creating Page classes with locators and action methods
@FindByannotation — declaring locators declarativelyPageFactory.initElements(driver, this)— initialising page elements- Structuring a multi-page project: LoginPage, HomePage, CartPage, etc.
- Understanding and handling
StaleElementReferenceException - Lazy initialisation vs eager initialisation of page elements
- Reusing page objects across multiple test classes
- Core annotations:
@Test,@BeforeMethod,@AfterMethod,@BeforeClass,@AfterClass,@BeforeSuite,@AfterSuite - Test grouping with
groupsattribute — running smoke vs regression sets - Parameterisation using
@Parametersandtestng.xmlconfiguration - Data-driven testing using
@DataProvider - Parallel test execution — configuring thread count in
testng.xml - Test priority, dependency (
dependsOnMethods), and enabled flag - Custom logging using
Reporter.log()inside test methods
- Hard assertions with
Assert— test stops immediately on failure - Soft assertions with
SoftAssert— collect all failures, report at end - Common assertion methods:
assertEquals,assertTrue,assertFalse,assertNull,assertNotNull - Choosing between hard and soft assertions based on test scenario
- Adding Apache POI dependency to
pom.xmlfor.xlsxsupport XSSFWorkbook,XSSFSheet,XSSFRow,XSSFCell— reading the Excel object hierarchy- Reading test data row-by-row from an Excel file into test scripts
- Handling different cell types: String, Numeric, Boolean, Formula
- Writing test results (Pass/Fail) back into the Excel sheet
- Building a reusable
ExcelUtilsutility class for the framework
- Recommended folder structure:
src/mainfor utilities,src/testfor test scripts - Building a
BaseTestclass — centralised driver initialisation and teardown - Integrating POM page classes, Excel utilities, and TestNG configuration
- Maven Surefire Plugin — triggering test suites from command line
- Version control with GitHub — pushing the project, branching basics
- Selenium Grid architecture — Hub and Node setup for distributed execution
RemoteWebDriver— running tests on remote machines and browsers- Cloud-based grid execution using SauceLabs
- Configuring browser capabilities for parallel cross-browser runs
- Installing and configuring Jenkins for a Java/Maven project
- Creating a Jenkins job linked to a GitHub repository
- Scheduling automated test runs using cron-style build triggers
- Viewing TestNG reports and build history inside Jenkins dashboard
Scenario-Based Questions — Practise explaining how you would handle real situations: flaky tests, dynamic locators, synchronisation failures, framework design decisions.
Framework Walkthrough — Be ready to walk through the project you built in this course — folder structure, design decisions, and how each component connects.
Core Concepts Q&A — Frequently asked topics include POM vs non-POM, implicit vs explicit waits, hard vs soft assertions, TestNG vs JUnit, and Selenium 3 vs 4 differences.
Live Coding Rounds — Practice writing locators, handling alerts, and reading data from Excel during a live coding session — exactly as asked in real QA interviews.