Java, Selenium, Appium & OTT TV Testing - Interview Q&A (3.
5 Years Experience)
Core Java / Framework
Q1: Explain the hybrid framework architecture you built. A: I built a hybrid framework using Page Object
Model (POM) for maintainability, with reusable utilities for common actions like click, sendKeys, waits, and
logging. Test data is managed via Excel/JSON files, and reporting is done with ExtentReports/Allure. TestNG
is used as the test runner, and the framework is integrated with Maven for build management and Jenkins
for CI/CD execution.
Q2: How do you handle dynamic XPath or elements? A: I use contains() , starts-with() , and relative
XPath to handle dynamic elements. Example: //button[contains(@id,'submit')] or CSS selectors
when more reliable.
Q3: Difference between HashMap and HashSet and usage in automation? A: HashMap stores key-value
pairs; used to store test data or mappings. HashSet stores unique values; used to remove duplicates, e.g.,
from a list of dynamic WebElements.
Q4: Challenges with Java streams or lambdas? A: Used streams to filter WebElements:
elements.stream().filter(e ->
e.getText().contains("xyz")).collect(Collectors.toList()) . Challenge was handling stale
elements and nulls, solved using proper waits and Optional handling.
Selenium WebDriver
Q1: How do you handle synchronization issues? A: Using Explicit Waits ( WebDriverWait with
ExpectedConditions ) and FluentWait for polling intervals. Avoid implicit wait for better control.
Q2: Difference between findElement and findElements? A: findElement returns the first match and
throws NoSuchElementException if not found. findElements returns a list; empty list if no element
found.
Q3: Handling multiple windows/tabs? A: Use getWindowHandles() and loop through handles to switch
using driver.switchTo().window(handle) .
Q4: How to run tests in parallel? A: Using TestNG <suite> XML parallel attributes or Selenium Grid. Grid
allows running tests on multiple nodes/devices simultaneously.
CI/CD – Jenkins
Q1: How do you trigger automation runs from Jenkins? A: Via Maven goals ( mvn clean test ) in Jenkins
freestyle job or pipeline script.
1
Q2: Passing parameters in Jenkins jobs? A: Use Parameterized Build, pass environment or browser type,
read in test using System.getProperty() .
Q3: Publishing reports in Jenkins? A: Archive Extent/Allure HTML reports using 'Publish HTML Reports'
plugin.
Appium (Mobile Testing)
Q1: Desired capabilities used? A: platformName , deviceName , automationName , appPackage ,
appActivity , udid . Example for Android real device:
cap.setCapability("platformName", "Android");
cap.setCapability("deviceName", "Pixel_5");
cap.setCapability("appPackage", "com.example.app");
cap.setCapability("appActivity", ".MainActivity");
Q2: Scroll/swipe actions? A: Using TouchAction or W3C Actions API. Example:
new TouchAction(driver).press(PointOption.point(x1,
y1)).moveTo(PointOption.point(x2, y2)).release().perform();
Q3: Switching contexts in hybrid apps? A: driver.getContextHandles() returns available contexts. Use
driver.context("WEBVIEW") to switch.
Q4: Running tests on real devices? A: For Android, connect via ADB; for iOS, use Xcode with real device
UDID.
OTT / Smart TV Automation
Q1: Inspecting elements? A: Android TV: ADB + UIAutomator Viewer; Samsung Tizen: Tizen Studio
Inspector; LG WebOS: WebOS DevTools.
Q2: Automating video playback? A: Validate play, pause, resume, seek, buffering, ads. Used Appium/Suitest
gestures or key events (DPAD). Assertions verify video state.
Q3: Testing without physical devices? A: Use emulators/simulators and cloud tools like Suitest,
BrowserStack, or AWS Device Farm.
Q4: Challenges in TV automation? A: Limited device availability, slow UI responses, varying screen
resolutions. Solved using emulators, retries, and device farms.
2
Testing Concepts / Agile
Q1: Difference between Smoke and Sanity testing? A: Smoke: basic functionality check to ensure build
stability. Sanity: focused testing of new features or bug fixes.
Q2: Deciding what to automate? A: Automate repetitive, high-priority, stable features. Avoid frequently
changing or low-risk scenarios.
Q3: Example of bug caught via automation? A: Detected video freeze issue in Android TV during ads
playback which manual testing missed due to timing.
Q4: Collaboration in Agile? A: Participate in daily stand-ups, discuss blockers, review requirements with
developers, update Jira tickets for defects.
Prepared for 3.5 years of experience in Java, Selenium, Appium, Jenkins, Mobile & OTT TV automation.