Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.
About Hexaware hiring for Automation Testing roles
Hexaware Technologies is an Indian IT services company offering cloud, application, testing, data and business process services. It promotes an automation-first approach and serves clients in financial services, healthcare, travel and manufacturing. In India it hires for software engineers, test engineers, data analysts and data engineers.
For Automation Testing roles, this Hexaware practice set focuses most on Selenium WebDriver (8), Cucumber and BDD (7), Page Object Model (7), TestNG Framework (3). It has 22 easy, 18 medium questions, so you can start easy and work up to the harder ones.
Company type
IT services
Headquarters
Navi Mumbai, India
Main India offices
Navi Mumbai, Chennai, Pune, Bengaluru, Noida
Hexaware Automation Testing interview process
Online assessment (aptitude + coding)
Communication assessment
Technical interview
HR round
Typical pattern based on public candidate experiences. Rounds vary by role, team and year.
Solved for HexawareStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
dryRun=true makes Cucumber parse all feature files and check every step has a matching definition without actually executing anything. It is fast and is useful after writing new features, during refactoring, or as a quick CI gate to catch undefined or ambiguous steps. It also prints snippets for missing step definitions that you can paste and implement.
04
What is WebDriver and how does it communicate with the browser?
Tag them, for example with @wip, and exclude the tag in the CI runner using a tag expression like not @wip, set through the cucumber.filter.tags property or the runner options. Developers can still run them locally by including the tag. Review @wip scenarios regularly so they do not stay parked forever, and never use the tag to hide failing tests that should be fixed or reported as bugs.
06
How do you measure and assert API response time in REST Assured?
Use then().time(lessThan(2000L)) for a quick check or response.getTimeIn(TimeUnit.MILLISECONDS) to log the value. This measures client-side time, including network, so set generous thresholds and treat it as a smoke signal, not a performance test. For real load and latency percentiles, use tools such as JMeter, Gatling or k6.
07
Tell me about a time you had to explain a technical test failure to a non-technical manager.
Situation: a release was blocked by failing tests and the manager wanted to know if it was safe to ship. Task: explain the risk without jargon. Action: I separated the failures into one real bug, where customers could be charged twice, and three environment issues. I showed the bug with a short screen recording. Result: the manager delayed the release by one day, the bug was fixed and the environment issues were assigned to DevOps.
08
How do you share state between step definition classes in Cucumber Java?
Use dependency injection. With cucumber-picocontainer (or Spring/Guice), create a context class such as TestContext holding the driver, page objects and scenario data, and add it as a constructor parameter in every step class. Cucumber creates one instance per scenario and injects the same object everywhere, so state is shared within a scenario but never leaks between scenarios. Avoid static fields because they break parallel runs.
09
Write Selenium code to wait for a loader to disappear and then click a button.
All three move the current branch to another commit, but treat your changes differently. Soft keeps the changes staged, which is useful to squash recent commits. Mixed, the default, keeps the changes in the working folder but unstages them. Hard throws away staged and working changes completely, so use it carefully. Never reset commits that are already pushed to a shared branch; use git revert there instead.
12
What is RemoteWebDriver and how is it different from ChromeDriver?
ChromeDriver starts and controls a browser on the same machine as the test. RemoteWebDriver sends the same WebDriver commands over HTTP to a remote endpoint, such as a Selenium Grid, a Docker container or a cloud provider, which starts the browser elsewhere. You pass the Grid URL and browser options, and the rest of the test code stays the same. ChromeDriver itself actually extends RemoteWebDriver.
The three amigos are the business representative (product owner or BA), the developer and the tester, who meet before development to discuss a story. They agree on rules and concrete examples, which become Gherkin scenarios. The meeting catches misunderstandings early, before code is written. Cucumber automation is the output, but the conversation is the real value of BDD.
Shift-left means testing earlier in the development cycle: reviewing requirements, writing acceptance criteria and test cases before coding, running unit and API tests on every commit, and giving developers fast feedback. Defects found early are cheaper to fix. In practice SDETs pair with developers, add tests to pull request pipelines and test APIs before the UI is built.
Locate rows and columns with XPath such as //table//tr and //td, loop through them to read or click cells, or build the XPath dynamically from the row text.
BasePage is a parent class for all page objects holding common things: the driver reference, a WebDriverWait, and helper methods such as click with wait, type, getText, waitForVisible and scrollIntoView. Child pages extend it and stay focused on page-specific locators and actions. Keep it small; if it grows into hundreds of methods, move helpers into separate utility classes using composition.
Configure plugins such as pretty for console, html:target/cucumber.html for a built-in report and json:target/cucumber.json for tools. The JSON feeds maven-cucumber-reporting or the Jenkins Cucumber Reports plugin. For richer dashboards, add the Allure or Extent Cucumber adapter. Attach screenshots and logs in hooks so failures can be analysed from the report alone.
22
A runtime permission pop-up appears on first launch and breaks your Android tests. How do you handle it?
The cleanest fix is the capability appium:autoGrantPermissions set to true, which grants all permissions the app declares at install time. If you need to test the permission flow itself, handle the dialog explicitly by waiting for the Allow button using its resource-id and clicking it. Another option is granting a specific permission with adb shell pm grant before the test. Avoid blind try-catch around taps, because it hides real failures.
23
How do you pass the WebDriver to page objects in a parallel framework?
Use a DriverManager with a ThreadLocal<WebDriver>, created in @BeforeMethod and removed in @AfterMethod. Page objects receive the driver through the constructor or get it from DriverManager.getDriver(). Constructor injection is cleaner and easier to test. Never store the driver in a static field shared by all threads, or parallel tests will control each other's browsers.
24
How do you make page objects work with dynamic locators, such as a row containing a given name?
Write a method that builds the locator from a parameter, for example private By rowFor(String name) { return By.xpath("//tr[td[normalize-space()='" + name + "']]"); }, and expose actions like deleteUser(name). Keep the template in the page class, not in tests. Escape quotes if names may contain them, and prefer CSS with data attributes when the application provides them.
25
What is correlation in JMeter and why is it needed?
Correlation means capturing dynamic values from one response and passing them into later requests. Session ids, CSRF tokens, auth tokens and order ids change every run, so a recorded script with hard-coded values fails on replay. In JMeter you use post-processors such as JSON Extractor, Regular Expression Extractor or CSS Selector Extractor to save the value into a variable, then reference it as ${token} in later headers or bodies.
26
What locator strategy do you follow inside page objects?
Prefer stable attributes in this order: dedicated test attributes like data-testid, id, name, then short CSS selectors, and XPath only when text or complex relationships are needed. Avoid absolute XPaths and index-based locators. Keep locators as private final By fields at the top of the class with clear names, so updates are quick and readable.
27
What is the difference between driver.close() and driver.quit()?
Rule, added in Gherkin 6, groups scenarios that illustrate one business rule inside a feature. For example, a Feature: Discounts can have Rule: Orders above 1000 get free delivery, followed by scenarios showing the rule holding and not holding. Each Rule can have its own Background. It makes feature files read like a specification of rules with examples, which helps business stakeholders see exactly what each scenario proves.
29
What is the Page Object Model and what problem does it solve?
POM is a design pattern where each page or component of the application has a class holding its locators and the actions a user can perform there, such as login() or searchProduct(). Tests call these methods instead of using Selenium directly. When the UI changes, you update one page class instead of dozens of tests, which reduces duplication and makes tests readable.
30
How do you verify that the correct page has loaded in POM?
Give each page an isAt() or waitUntilLoaded() method that waits for a unique element, page title or URL fragment. Call it in the constructor or right after navigation. If it fails, throw a clear error such as "Expected Cart page but URL was /login". This catches navigation problems at the right point instead of failing later with a confusing locator error.
31
Write Java code to start an Android Appium session using UiAutomator2Options.
The basic auth dialog is not part of the page, so findElement cannot reach it. The simplest way is putting credentials in the URL, like https://user:pass@site.test, which works in many browsers. In Selenium 4 with Chromium you can register credentials through the HasAuthentication interface: ((HasAuthentication) driver).register(UsernameAndPassword.of("user", "pass")). Keep the credentials in environment variables or a secret store, never in code.
33
What are page components or page fragments in POM?
Components are classes for UI parts that repeat across pages, such as the header, search bar, date picker or a data table. A page object then has-a component: homePage.header().search("laptop"). This follows composition over inheritance, avoids duplicate locators and matches modern component-based frontends. Components are usually scoped to a root WebElement so locators search only inside that element.
34
What is the difference between continuous delivery and continuous deployment?
In continuous delivery every change that passes the pipeline is ready to release, but a person approves the production deployment. In continuous deployment every passing change is released to production automatically. Continuous deployment requires very reliable automated tests and monitoring, because there is no manual check before users see the change.
35
How do you log requests and responses in REST Assured?
Use given().log().all() for the full request and then().log().all() for the full response. To reduce noise, use log().ifValidationFails() on both, which prints only when a test fails. For a whole suite, set RestAssured.enableLoggingOfRequestAndResponseIfValidationFails() or add RequestLoggingFilter and ResponseLoggingFilter in a shared spec. Mask tokens and passwords before logs reach CI.
== compares object references, not content. String literals are interned, so two literals with the same text may share a reference and == returns true, but strings read from the UI or built at runtime are new objects, so == returns false even with the same text. Use equals() or equalsIgnoreCase() for content, and Objects.equals() to be null-safe.
Appium 2 split the monolithic server into a core plus separately installed drivers and plugins, managed with appium driver install and appium plugin install. It dropped the old JSON Wire Protocol in favour of W3C WebDriver only, so vendor capabilities need the appium: prefix. The default base path changed from /wd/hub to /. Old TouchAction and MultiTouchAction were removed from the Java client, so gestures use W3C Actions or mobile: commands.
Tips to crack the Hexaware Automation Testing interview
Practise aptitude and simple coding questions under time pressure for the online assessment.
Revise automation testing basics with Selenium and API testing, as quality engineering is an important service line.
Learn about Hexaware's automation and cloud focus and its key industry verticals for company questions.
Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
Practise the hard questions on this page aloud; Hexaware interviewers usually ask follow-ups on your first answer.
Frequently asked questions
How many rounds are there in the Hexaware Automation Testing interview?
Candidates usually go through 4 stages: Online assessment (aptitude + coding); Communication assessment; Technical interview; HR round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.
Which topics should I prepare for the Hexaware Automation Testing interview?
This practice set leans on Selenium WebDriver (8), Cucumber and BDD (7), Page Object Model (7), TestNG Framework (3). Revise those first, then practise explaining one or two of your own projects end to end, because most Hexaware interviewers ask you to walk through real work.
Are these the exact questions asked at Hexaware?
No. These are curated practice questions that match the skills and difficulty usually tested in it services interviews like Hexaware's. They are not a leaked or verified list of past questions.
Where does Hexaware hire Automation Testing professionals in India?
Hexaware has large teams in Navi Mumbai, Chennai, Pune, Bengaluru, Noida. Openings and locations change often, so check the Hexaware careers page and filter by city and experience.
Automation Testing questions for similar companies