i
Hexaware Technologies
Filter interviews by
I applied via Naukri.com and was interviewed in May 2024. There was 1 interview round.
A Java program to check if a number is prime or not.
Create a function to check if a number is prime by iterating from 2 to the square root of the number.
If the number is divisible by any number in that range, it is not prime.
Handle edge cases like 0, 1, and negative numbers separately.
Example: public static boolean isPrime(int num) { for(int i=2; i<=Math.sqrt(num); i++) { if(num % i == 0) { return false; } } return tru
Program to determine if a given year is a leap year or not
Check if the year is divisible by 4
If the year is divisible by 100, also check if it is divisible by 400
If both conditions are met, it is a leap year
I used OOPS concepts in my framework for creating reusable components and maintaining code modularity.
Used inheritance to create a base class with common functionalities shared by multiple classes
Implemented polymorphism to allow different classes to implement the same method in their own way
Encapsulated data and behavior within classes using access modifiers like private and public
Utilized abstraction to hide the impl...
Java program to add numbers 6134 to get total 14.
Create an array of integers with the numbers to be added
Iterate through the array and add the numbers
Check if the total equals 14
Top trending discussions
I applied via Referral and was interviewed in Aug 2024. There was 1 interview round.
We are using the Selenium framework for automation testing in our project.
Selenium is a popular open-source automation testing framework
It supports multiple programming languages like Java, Python, C#, etc.
Selenium WebDriver is used for automating web applications
It provides features for browser automation, testing across different browsers, and parallel test execution
Framework structure refers to the organization and layout of the automation framework components.
Framework structure includes modules, libraries, test scripts, configuration files, and test data.
It follows a hierarchical structure with layers such as driver scripts, reusable libraries, and test cases.
Frameworks can be structured as linear, modular, data-driven, keyword-driven, or hybrid.
Example: In a data-driven framew...
findelement returns the first matching element on a webpage, findelements returns a list of all matching elements.
findelement returns a single WebElement, findelements returns a list of WebElements
findelement throws NoSuchElementException if no element is found, findelements returns an empty list
Example: driver.findElement(By.id("exampleId")) vs driver.findElements(By.className("exampleClass"))
Handling multiple tabs in Selenium involves switching between tabs and performing actions on each tab.
Use getWindowHandles() to get a set of window handles
Switch to a specific tab using switchTo().window(handle)
Perform actions on the tab
Close the tab if needed using driver.close()
Hashmaps are data structures that store key-value pairs and allow for efficient retrieval of values based on keys.
Hashmaps are also known as dictionaries, maps, or associative arrays.
They use a hash function to map keys to indices in an underlying array.
Hashmaps offer constant-time average case complexity for insertion, deletion, and lookup operations.
Example: HashMap
Try and catch blocks are used in programming to handle exceptions and prevent the program from crashing.
Try block is used to enclose the code that might throw an exception
Catch block is used to handle the exception thrown in the try block
It prevents the program from crashing and allows for graceful error handling
Can also include finally block to execute code regardless of whether an exception is thrown
Inheritance is a concept in object-oriented programming where a class can inherit attributes and methods from another class.
Allows a class to inherit attributes and methods from another class
Promotes code reusability and reduces redundancy
Creates a parent-child relationship between classes
Derived class can access the properties and methods of the base class
Example: Class 'Car' can inherit from class 'Vehicle'
I applied via Naukri.com and was interviewed in Aug 2024. There was 1 interview round.
Use Selenium WebDriver to find all web elements in a web page
Instantiate a WebDriver object using Selenium
Use findElements method to locate all elements on the page
Store the found elements in a list for further processing
Code to find implicit and explicit wait in automation testing
For implicit wait, set a global timeout for the driver to wait for elements to be available before throwing an error
Example: driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
For explicit wait, wait for a specific condition to be met before proceeding with the test
Example: WebDriverWait wait = new WebDriverWait(driver, 10); wait.until(ExpectedCo...
Code to find occurrence of a character in a given string
Iterate through each character in the string
Count occurrences of the specified character
Return the total count of occurrences
I applied via Naukri.com and was interviewed in Jul 2024. There was 1 interview round.
You can check the OS on which the Selenium program is running by using the 'System.getProperty()' method in Java.
Use 'System.getProperty('os.name')' to get the name of the operating system
Use 'System.getProperty('os.version')' to get the version of the operating system
Use 'System.getProperty('os.arch')' to get the architecture of the operating system
I applied via Job Portal and was interviewed in May 2024. There were 2 interview rounds.
I applied via Company Website and was interviewed in Jan 2024. There was 1 interview round.
Best practices in automation framework include modular design, code reusability, error handling, and continuous integration.
Modular design: Break the automation framework into smaller modules for better maintainability and reusability.
Code reusability: Write reusable functions and libraries to avoid duplication of code.
Error handling: Implement proper error handling mechanisms to gracefully handle exceptions and failur...
Give second largest number in array
maven and gradle
path parameter and query parameter
how to run cucumber test cases
I applied via Naukri.com and was interviewed in Jul 2024. There was 1 interview round.
Asked to solve Java simple problem, questions on Selenium and java
I applied via Approached by Company and was interviewed in May 2023. There were 4 interview rounds.
There was one program which will be easy-medium leavel.
The interview questions cover OOP concepts, coding exercises, project frameworks, Selenium automation, BDD with Cucumber, and TestNG.
OOP concepts include inheritance, encapsulation, polymorphism, and abstraction.
Example: Inheritance - a class 'Car' can inherit properties from a class 'Vehicle'.
To find missing number in a list, iterate through the list and check for gaps in sequence.
Example: List {1, 2, 4, 5} - Missing ...
Senior Software Engineer
3.8k
salaries
| ₹5.4 L/yr - ₹20 L/yr |
System Analyst
3k
salaries
| ₹6.7 L/yr - ₹29 L/yr |
Software Engineer
2.9k
salaries
| ₹2 L/yr - ₹10 L/yr |
Senior Executive
2k
salaries
| ₹0.8 L/yr - ₹6.2 L/yr |
Technical Architect
1.9k
salaries
| ₹10 L/yr - ₹36 L/yr |
Cognizant
TCS
Infosys
Wipro