i
LTIMindtree
Filter interviews by
posted on 1 Sep 2024
Automate dynamic web page with multiple popups and pages by using a combination of tools like Selenium, TestNG, and Page Object Model.
Use Selenium WebDriver to interact with elements on the web page.
Implement TestNG for test case management and execution.
Utilize Page Object Model design pattern to organize and maintain the automation code.
Handle popups using WebDriver's switchTo() method.
Use explicit waits to handle dy...
Automating payment gateway and process in Selenium WebDriver involves identifying elements, handling pop-ups, and verifying transactions.
Identify and interact with payment gateway elements using Selenium WebDriver commands.
Handle any pop-ups or alerts that may appear during the payment process.
Verify successful completion of the payment transaction by checking for expected outcomes.
Use test data to simulate different p...
Code to find all links in a page
Use a web scraping library like BeautifulSoup or Selenium to parse the HTML of the page
Identify the HTML tags that contain links (usually tags)
Extract the 'href' attribute from each tag to get the link URL
Binary search program for sorting array of strings.
Define a function that takes in an array of strings and a target string to search for.
Sort the array of strings using a sorting algorithm like quicksort or mergesort.
Implement binary search algorithm to find the target string in the sorted array.
To automate API using Selenium WebDriver, we can use tools like RestAssured and create test scripts to interact with API endpoints.
Use RestAssured library to send HTTP requests and validate responses
Create test scripts to interact with API endpoints and verify data
Utilize Selenium WebDriver to automate the process of sending requests and validating responses
posted on 28 Dec 2024
posted on 23 Apr 2024
Oops concept of java refers to Object-Oriented Programming principles like Inheritance, Encapsulation, Polymorphism, and Abstraction.
Inheritance: Allows a class to inherit properties and behavior from another class.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Polymorphism: Ability of a method to do different things based on the object it is acting upon.
Abstraction: Hiding the imp...
I applied via Naukri.com and was interviewed in Sep 2024. There was 1 interview round.
The output of the code will be 'animal is created' followed by 'Dog is created'.
The code defines a class Animal with a constructor that prints 'animal is created'.
It also defines a class Dog that extends Animal, with a constructor that prints 'Dog is created'.
In the main method, an instance of Dog is created, which will trigger the constructors of both Animal and Dog classes.
The output will be 'HelloThere'
Concatenation of 'Hello' and 'There' results in 'HelloThere'
The final string is printed using System.out.println()
The code creates a StringBuffer object with 'Hello' and appends 'There' to it before printing the final string.
StringBuffer is mutable, so the original 'Hello' string can be modified
The append() method adds the specified string to the end of the buffer
The final output will be 'HelloThere'
Option a is valid, option b is valid, option c is invalid.
Option a is valid because ChromeDriver is a subclass of WebDriver, so it can be assigned to a WebDriver reference.
Option b is valid because ChromeDriver is a subclass of WebDriver, so it can be instantiated using a WebDriver reference.
Option c is invalid because WebDriver is an interface and cannot be instantiated directly. It can only be used as a reference typ
Sort input array of strings in descending order without using inbuilt functions
Iterate through the array and compare each element with the rest to find the largest element
Swap the largest element with the first element, then repeat the process for the remaining elements
Continue this process until the array is sorted in descending order
findElement returns the first matching element on the page, while findElements returns a list of all matching elements.
findElement returns a single WebElement matching the locator provided
findElements returns a list of WebElements matching the locator provided
findElement will throw NoSuchElementException if no element is found, while findElements will return an empty list
getwindowhandle returns the handle of the current window, getwindowhandles() returns handles of all open windows
getwindowhandle returns a single window handle, while getwindowhandles() returns a set of window handles
getwindowhandle is used to switch between windows in Selenium WebDriver
Output type of getwindowhandle is String, while output type of getwindowhandles() is Set
String is immutable, while StringBuilder is mutable and more efficient for concatenating strings.
String is immutable, meaning its value cannot be changed once it is created.
StringBuilder is mutable, allowing for modifications to the string without creating a new object.
StringBuilder is more efficient for concatenating multiple strings as it does not create new objects each time.
Example: String str = "Hello"; StringBuil
The @BeforeMethod annotation is used to run a method before each test method in a class, while @BeforeTest is used to run a method before any test method in a test tag.
The @BeforeMethod annotation is specific to TestNG framework and is used to initialize test data before each test method.
@BeforeTest annotation is also specific to TestNG and is used to initialize test data before any test method in a test tag.
If a class...
I applied via Company Website and was interviewed in Oct 2024. There was 1 interview round.
Java program to print sum of digits from a given string
Iterate through each character in the string
Check if the character is a digit using Character.isDigit() method
Convert the digit character to integer using Character.getNumericValue() method
Sum up all the digits found in the string
OOPs concepts used in the framework include inheritance, polymorphism, encapsulation, and abstraction.
Inheritance is used to create a parent-child relationship between classes. For example, a base class 'Page' can be inherited by 'HomePage' and 'LoginPage' classes.
Polymorphism allows objects of different classes to be treated as objects of a common superclass. For instance, a 'click' method can be implemented different...
Polymorphism is the ability of a single function or method to operate on different types of data.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
There are two types of polymorphism: compile-time (method overloading) and runtime (method overriding).
Example of compile-time polymorphism: function overloading in Java.
Example of runtime polymorphism: method overriding in Java
Java program to print the sum of elements in a string array.
Convert each element in the string array to an integer using Integer.parseInt()
Sum up all the integers to get the total sum
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 Job Portal
API testing involves testing the functionality, reliability, performance, and security of APIs.
Testing API endpoints for correct response codes and data
Verifying data accuracy and consistency in API responses
Testing API security measures such as authentication and authorization
Performance testing to ensure APIs can handle expected load
Exploratory testing to uncover potential issues
Given When Then is implemented in BDD framework by writing scenarios in a structured format to define behavior
BDD frameworks like Cucumber use Given When Then to structure scenarios
Given describes the initial state of the system
When describes the action taken by the user
Then describes the expected outcome or result
Example: Given a user is logged in, When they click on the 'Logout' button, Then they should be logged out
I was interviewed in May 2024.
Gherkin words are keywords used in Gherkin syntax for writing test scenarios in Behavior Driven Development (BDD).
Feature
Scenario
Given
When
Then
And
But
Plugins are used to extend the functionality of a software application.
Plugins are additional software components that can be added to an existing application to provide new features or functionalities.
They can be used to customize the behavior of the application without modifying its core code.
Examples of plugins include browser extensions, WordPress plugins, and Adobe Photoshop filters.
To run a runner class, you can use a test runner tool like JUnit or TestNG in your automation testing framework.
Use a test runner tool like JUnit or TestNG to execute the runner class
Add the @RunWith annotation in JUnit or specify the runner class in TestNG XML file
Make sure the runner class includes the necessary setup and teardown methods for test execution
TestNG allows running tests in parallel mode using groups and priorities.
Use 'parallel' attribute in testng.xml file to specify parallel mode (e.g.
Use 'groups' attribute in testng.xml file to group tests that should run in parallel (e.g.
Use 'priority' attribute in testng.xml file to specify the order in which tests should run (e.g.
Merge Sort is a divide and conquer algorithm that divides the input array into two halves, sorts them, and then merges them back together.
Divide the array into two halves recursively
Sort each half using Merge Sort recursively
Merge the sorted halves back together
Program to reverse a string using array of characters
Create an array of characters from the input string
Iterate through the array in reverse order and append each character to a new string
Return the reversed string
Data driven testing syntax using XSSF Workbook
Create XSSFWorkbook object
Get the sheet from the workbook
Iterate through rows and columns to fetch test data
Use test data in your test cases
Reverse a string in Java using StringBuilder's reverse method.
Create a StringBuilder object with the input string
Use the reverse() method of StringBuilder to reverse the string
Convert the reversed StringBuilder object back to a string using toString()
An interface in software development is a contract that defines the methods that a class must implement.
Interfaces in programming languages like Java, C#, and TypeScript provide a way to achieve abstraction and multiple inheritance.
Classes implementing an interface must provide concrete implementations for all the methods defined in the interface.
Interfaces allow for loose coupling between components, making code more
Some of the top questions asked at the LTIMindtree Quality Assurance and Automation Tester interview -
Senior Software Engineer
21.2k
salaries
| ₹4.7 L/yr - ₹18.5 L/yr |
Software Engineer
16.2k
salaries
| ₹2 L/yr - ₹10 L/yr |
Module Lead
6.8k
salaries
| ₹7 L/yr - ₹25 L/yr |
Technical Lead
6.5k
salaries
| ₹9.3 L/yr - ₹36.8 L/yr |
Senior Engineer
4.4k
salaries
| ₹4.2 L/yr - ₹16.1 L/yr |
Cognizant
Capgemini
Accenture
TCS