
Infosys

50+ Infosys Automation Test Engineer Interview Questions and Answers
Q1. Introduce yourself 1.What is STLC 2. difference between Test plan,test case,test scanario 3.Positive and negative scanarion on pen. 4.selenium framework. 5.how to write selenium test cases.
I am an Automation Test Engineer with knowledge of STLC, test plan, test case, test scenario, Selenium framework, and writing Selenium test cases.
STLC stands for Software Testing Life Cycle and is a process followed to ensure quality in software testing.
Test plan is a document that outlines the testing strategy, objectives, and scope of testing.
Test case is a set of steps and conditions that are executed to verify the functionality of a software application.
Test scenario is a...read more
Q2. 3. What are different types of waits in selenium.
Different types of waits in Selenium include implicit, explicit, and fluent waits.
Implicit wait: waits for a certain amount of time before throwing an exception if the element is not found
Explicit wait: waits for a certain condition to be met before proceeding with the next step
Fluent wait: waits for a certain condition to be met within a specified time frame, polling at regular intervals
Examples: WebDriverWait, ExpectedConditions
Q3. 2.How to execute test cases in parallel.
Test cases can be executed in parallel by using tools like Selenium Grid or TestNG.
Use a tool like Selenium Grid to distribute test cases across multiple machines
Use TestNG to run tests in parallel by specifying the number of threads
Ensure that the test cases are independent and do not have any dependencies
Use a continuous integration tool like Jenkins to manage and execute parallel tests
Monitor the test execution and analyze the results to identify any issues
Parallel executi...read more
Q4. What are the challenges in selenium
Challenges in Selenium include browser compatibility, dynamic elements, and test maintenance.
Browser compatibility issues can arise due to differences in browser versions and configurations.
Dynamic elements can cause tests to fail if not handled properly.
Test maintenance can be challenging due to changes in the application under test.
Synchronization issues can occur when the test script runs faster than the application.
Handling pop-ups and alerts can be tricky.
Cross-domain te...read more
Q5. 1. Automation Framework used in project.
We used a hybrid automation framework that combined data-driven and keyword-driven approaches.
The framework was built using Selenium WebDriver and TestNG.
We used Excel sheets to store test data and Apache POI library to read/write data from/to Excel.
The framework had reusable functions and libraries for common actions like login, logout, etc.
We also used Jenkins for continuous integration and execution of automated tests.
The framework was designed to be scalable and maintaina...read more
Q6. Write left star pattern in java? How to run parallel test cases in automation testing? What are different annotation used in TestNG?
To create a left star pattern in Java, use nested loops to print stars in a left-aligned triangle shape. To run parallel test cases in automation testing, use TestNG's parallel attribute in the testng.xml file. TestNG annotations include @Test, @BeforeSuite, @AfterSuite, @BeforeTest, @AfterTest, @BeforeClass, @AfterClass, @BeforeMethod, @AfterMethod.
For left star pattern in Java, use nested loops to print stars in a left-aligned triangle shape.
To run parallel test cases in au...read more
Q7. how to handle broken links in selenium
To handle broken links in Selenium, we can use the HTTPURLConnection class to check the response code of the link.
Get all the links on the page using findElements() method
Iterate through each link and get the href attribute
Create a URL object for the href attribute
Open a connection using HTTPURLConnection class
Get the response code using getResponseCode() method
If the response code is not 200, mark the link as broken
Q8. Which method you use to remove spaces in the string
One method to remove spaces in a string is by using the replace() method in JavaScript.
Use the replace() method with a regular expression to replace all spaces with an empty string
Example: str.replace(/\s/g, '') will remove all spaces from the string 'hello world'
Another method is to use the split() method to split the string by spaces and then join the array elements without spaces
Q9. What kind of bugs you will encounter in API testing
Common bugs in API testing include incorrect data formats, authentication issues, and performance problems.
Incorrect data formats such as missing or incorrect parameters
Authentication issues like invalid tokens or permissions
Performance problems such as slow response times or timeouts
Q10. What is difference between authorization and authentication?
Authentication verifies the identity of a user, while authorization determines what a user can access.
Authentication confirms the user's identity through credentials like username and password.
Authorization determines the user's permissions and access levels once authenticated.
Authentication is the process of validating a user's identity, while authorization is the process of determining what actions a user is allowed to perform.
Example: Logging into a system with a username ...read more
Q11. Can you explain the Maven build lifecycle?
Maven build lifecycle consists of phases like compile, test, package, install, deploy.
Maven build lifecycle consists of three main phases: clean, default, and site.
Each phase consists of a series of goals that are executed in a specific order.
Some common goals in Maven build lifecycle include compile, test, package, install, and deploy.
The clean phase removes all files generated by the previous build.
The default phase is where the main build happens, including compilation, te...read more
Q12. Write java locator to get all elements in the webpage
Use Selenium WebDriver to find all elements on a webpage using Java locators
Use findElements method to locate all elements on the webpage
Use By class to specify the locator strategy (e.g. By.xpath, By.id, By.className)
Store the located elements in a List
Q13. Payment failure by debit card in e-commerce site? Make test scenarios?
Test scenarios for payment failure by debit card in e-commerce site
Attempt payment with insufficient funds in the account
Attempt payment with expired debit card
Attempt payment with incorrect CVV code
Attempt payment with incorrect card details
Attempt payment while the bank's server is down
Q14. What is the difference implicit wait and explicit wait
Implicit wait is set globally for the entire duration of the test script, while explicit wait is applied only to specific elements.
Implicit wait is set using driver.manage().timeouts().implicitlyWait() in Selenium, while explicit wait is implemented using WebDriverWait class.
Implicit wait is used to wait for elements to be present in the DOM, while explicit wait is used to wait for specific conditions to be met before proceeding.
Implicit wait is not recommended for dynamic we...read more
Q15. What is the difference between selenium 3 and selenium4
Selenium 4 has new features like relative locators, improved grid support, and better integration with DevTools compared to Selenium 3.
Selenium 4 has introduced relative locators which help in locating elements based on their relationship with other elements.
Selenium 4 provides improved grid support with the introduction of the new GridConfig class.
Selenium 4 has better integration with DevTools for better debugging and performance monitoring.
Selenium 4 has better support for...read more
Q16. Tell all webdriver exceptions
List of common WebDriver exceptions
NoSuchElementException - When an element is not found in the DOM
TimeoutException - When a command takes too long to complete
StaleElementReferenceException - When an element is no longer attached to the DOM
ElementNotVisibleException - When an element is present in the DOM but not visible
ElementNotInteractableException - When an element is present in the DOM but not interactable
InvalidElementStateException - When an element is in an invalid st...read more
Q17. What is the code to reverse a sentence?
Code to reverse a sentence using array of strings.
Split the sentence into an array of words
Reverse the array
Join the array back into a sentence
Q18. What is code for reverse a digit?
To reverse a digit, convert it to a string and then reverse the string.
Convert the digit to a string
Use built-in functions to reverse the string
Convert the reversed string back to a digit if needed
Q19. How to take screenshot when a test case is failed
Use Selenium WebDriver to capture screenshot on test case failure
Use Selenium WebDriver's getScreenshotAs method to capture screenshot
Save the screenshot to a specified location on the system
Include the screenshot capture code in the test case failure handling logic
Q20. Difference between agile and waterfall based model?
Agile is iterative and flexible, while waterfall is sequential and rigid.
Agile focuses on delivering working software in short iterations, while waterfall follows a linear approach with distinct phases.
Agile allows for changes and adaptations throughout the project, while waterfall requires detailed planning upfront.
Agile promotes collaboration and communication within teams, while waterfall relies on strict documentation and processes.
Agile is better suited for projects with...read more
Q21. 4.Limitation of selenium.
Selenium has limitations in handling non-web-based applications and requires technical expertise.
Selenium cannot automate desktop applications or mobile apps
It requires technical knowledge to handle dynamic web elements
Selenium scripts can be brittle and require maintenance
It cannot handle CAPTCHA or OTP verification
Selenium does not have built-in reporting capabilities
Q22. What is exclude and include in TestNG?
Exclude and include in TestNG are used to specify which test methods to run or skip during test execution.
Exclude attribute is used to specify which test methods to skip during test execution
Include attribute is used to specify which test methods to run during test execution
Both attributes can be used in the testng.xml file or in the @Test annotation
Example: @Test(groups = {"smoke"}, excludeGroups = {"regression"})
Q23. Challenges faced during commit code in Version control
Challenges include conflicts with other developers' changes, incorrect file paths, and forgetting to add files.
Conflicts with other developers' changes
Incorrect file paths
Forgetting to add files
Q24. How to check the password is encrypted
Check the password encryption by verifying the hashing algorithm used and comparing the encrypted password with a known hash value.
Check the hashing algorithm used to encrypt the password (e.g. MD5, SHA-256)
Compare the encrypted password with a known hash value for the same password
Ensure that the encryption process is irreversible, meaning the original password cannot be easily obtained from the encrypted version
Q25. What are HTTP methods in API Testing?
HTTP methods are actions that can be performed on a resource in API testing.
GET - Retrieve data from a server
POST - Submit data to a server
PUT - Update an existing resource on a server
DELETE - Remove a resource from a server
PATCH - Partially update a resource on a server
Q26. Where u used oops concepts in ur framework
I used OOPs concepts in my framework for creating reusable components, inheritance, and encapsulation.
Used inheritance to create a base test class with common methods and properties
Implemented encapsulation to hide the internal details of the test cases
Utilized polymorphism for creating different types of test cases using the same interface
Q27. How to get URL of webpage
To get the URL of a webpage, you can use the window.location object in JavaScript.
Use window.location.href to get the full URL of the webpage
Use window.location.hostname to get the domain of the webpage
Use window.location.pathname to get the path of the webpage
Use window.location.protocol to get the protocol of the webpage (http or https)
Q28. 5.Enum in java.
Enum is a special data type in Java used to define a set of constants.
Enums can be used to create a set of related constants that can be used throughout the code.
Enums can have constructors, methods, and fields like a regular class.
Enums can be used in switch statements.
Example: enum Color { RED, GREEN, BLUE }
Example: Color c = Color.RED;
Q29. how postman helps for api testing
Postman helps in API testing by providing a user-friendly interface to send requests, automate testing, and analyze responses.
Postman allows testers to easily send requests to APIs and view responses in a user-friendly interface.
It provides features for automating API testing, such as creating test scripts and running collections of tests.
Postman also offers tools for analyzing responses, including detailed logs and test reports.
It supports various authentication methods, env...read more
Q30. purpose of pass, break and continue keywords
The pass, break, and continue keywords are used in programming to control the flow of execution in loops and conditional statements.
The pass keyword is used as a placeholder for code that will be implemented later.
The break keyword is used to exit a loop or switch statement.
The continue keyword is used to skip the rest of the current iteration and move to the next iteration in a loop.
Q31. Automation some online platforms within 3 mins of time
Automating online platforms within 3 mins requires efficient test scripts and tools.
Use automation tools like Selenium or Appium for web and mobile platforms respectively
Write efficient test scripts to cover critical functionalities within the time limit
Utilize parallel testing to speed up the automation process
Prioritize test cases based on risk and impact to ensure essential functionalities are covered
Implement data-driven testing to cover multiple scenarios quickly
Q32. Http operation you worked on
I have worked on Http operations for testing web applications.
I have experience in testing Http GET, POST, PUT, DELETE methods.
I have tested Http status codes like 200, 404, 500, etc.
I have used tools like Postman and RestAssured for Http testing.
I have tested Http requests and responses for RESTful APIs.
I have worked on Http cookies and sessions testing.
Example: I tested Http operations for a banking web application.
Example: I tested Http operations for an e-commerce web app...read more
Q33. Difference between test cases and test scenarios?
Test cases are detailed steps to test a specific functionality, while test scenarios are high-level descriptions of possible test paths.
Test cases are specific steps to test a particular functionality or feature.
Test scenarios are high-level descriptions of possible test paths or user interactions.
Test cases are detailed and concrete, while test scenarios are more abstract and general.
Test cases are usually written in a step-by-step format, while test scenarios are more like ...read more
Q34. What is static block in java?
Static block in Java is a block of code that is executed only once when the class is loaded.
Static block is used to initialize static variables of a class.
It is executed before the main method.
Syntax: static { // code to be executed }
Example: static { System.out.println("Static block executed"); }
Q35. One Task Repetition of Characters count logic
The task is to count the repetition of characters in a given string.
Iterate through each character in the string
Create a dictionary to store the count of each character
If the character is already present in the dictionary, increment its count
If the character is not present, add it to the dictionary with count 1
Return the dictionary with character counts
Q36. Dynamic webElements handling using Xpath?
Dynamic webElements can be handled using Xpath by using relative Xpath expressions to locate elements based on their attributes or position in the DOM.
Use Xpath expressions to locate webElements based on their attributes such as id, class, name, etc.
Use Xpath functions like contains(), starts-with(), and text() to locate elements based on their text content.
Use Xpath axes like following-sibling, preceding-sibling, parent, child, etc., to navigate through the DOM and locate el...read more
Q37. Why string immutable in java ?
String is immutable in Java to ensure security, thread safety, and optimization.
Immutable strings prevent accidental modification of data.
Immutable strings can be safely shared among multiple threads.
Immutable strings allow for efficient memory allocation and caching.
Immutable strings are used in various security-related operations.
Immutable strings enable the use of string pooling for optimization.
Q38. Agile Process (Agile vs Waterfall model)
Agile is iterative and flexible, while Waterfall is sequential and rigid.
Agile involves continuous feedback and adaptation, while Waterfall follows a linear approach.
Agile allows for changes throughout the development process, while Waterfall requires detailed planning upfront.
Agile promotes collaboration and communication among team members, while Waterfall has distinct phases with limited interaction.
Agile is better suited for projects with evolving requirements, while Wate...read more
Q39. Write a code for febonacci series
Code to generate Fibonacci series
Use a loop to generate Fibonacci numbers
Start with 0 and 1 as the first two numbers
Add the previous two numbers to get the next number
Repeat until desired number of Fibonacci numbers are generated
Q40. What is spike in agile?
A spike in agile is a time-boxed research or investigation task to gather information or explore potential solutions for a specific problem.
Spike is a temporary activity to reduce uncertainty or risk in a project.
It is time-boxed, meaning it has a fixed duration.
Spike is not a regular user story but a task to gather information or explore solutions.
Examples of spikes include researching a new technology, exploring a complex problem, or investigating a potential solution.
Q41. what is Test closure?
Test closure is the final phase of the testing process where all testing activities are completed and the testing team evaluates the testing process.
Test closure involves documenting the test results and preparing the final test closure report.
It includes analyzing the test metrics to assess the quality of the testing process.
Test closure also involves releasing the test environment and resources used during testing.
It marks the end of the testing phase and ensures that all t...read more
Q42. Write a program to reverse a string.
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 as the output.
Q43. Threads in soap ui
Threads in SoapUI are used to simulate concurrent user requests to a web service.
Threads allow for testing the performance and scalability of a web service
Multiple threads can be created to simulate concurrent user requests
Each thread can have its own set of test data and assertions
Thread properties can be configured in the SoapUI project settings
Q44. How to handle POPUPS
Handle popups by using automation tools, handling alerts, switching to popup windows, and using explicit waits.
Use automation tools like Selenium to handle popups
Handle alerts using switchTo().alert() method
Switch to popup windows using switchTo().window() method
Use explicit waits to ensure popup elements are loaded before interacting with them
Q45. What is polymorphism
Polymorphism is the ability of a function or method to behave differently based on the object it is called with.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
It enables a single interface to be used for different data types or classes.
Examples include method overloading and method overriding in object-oriented programming.
Q46. What is interface
An interface in programming is a contract that defines the methods that a class must implement.
Interfaces in programming are used to define a set of methods that a class must implement.
They provide a way to achieve abstraction and multiple inheritance in programming languages.
Interfaces are used to define the behavior of a class without specifying how it is implemented.
In languages like Java, classes can implement multiple interfaces to inherit the behavior of each interface....read more
Q47. Selenium vs Selenium Webdriver
Selenium is a suite of tools for web automation testing, while Selenium WebDriver is a tool specifically for automating web browsers.
Selenium is a suite of tools that includes Selenium WebDriver, Selenium IDE, and Selenium Grid.
Selenium WebDriver is a tool for automating web browsers and is the most commonly used component of Selenium.
Selenium WebDriver allows testers to write tests in various programming languages like Java, Python, C#, etc.
Selenium WebDriver provides a more...read more
Q48. what is postman
Postman is a popular API testing tool used for testing and debugging APIs.
Postman allows users to send requests to APIs and receive responses
It provides a user-friendly interface for creating and managing API requests
Postman can be used for automated testing of APIs
It supports various request types such as GET, POST, PUT, DELETE, etc.
Q49. testplan Vs test strategy
Test plan outlines the scope, approach, resources, and schedule of testing. Test strategy defines the testing approach for the entire project.
Test plan is a document that outlines the testing scope, objectives, and schedule.
Test strategy is a high-level document that defines the testing approach for the entire project.
Test plan is more detailed and specific to a particular testing phase or cycle.
Test strategy is more general and covers the entire project.
Test plan includes te...read more
Q50. Sprint point system? Explain?
Sprint point system is a method used in Agile project management to measure the amount of work completed in a sprint.
Sprint points are used to estimate the effort required to complete a task or user story.
Points are assigned based on complexity, effort, and risk involved in completing the task.
Common point systems include Fibonacci sequence (1, 2, 3, 5, 8, 13, etc.) or t-shirt sizes (XS, S, M, L, XL).
Q51. Explain Python OOPS Concepts
Python OOPS concepts include classes, objects, inheritance, polymorphism, and encapsulation.
Classes are blueprints for creating objects with attributes and methods.
Objects are instances of classes that can store data and perform actions.
Inheritance allows creating new classes by inheriting properties and methods from existing classes.
Polymorphism enables objects of different classes to be treated as objects of a common superclass.
Encapsulation hides the internal details of an...read more
Q52. Describe Your Framework
My framework is a data-driven framework using Selenium WebDriver and TestNG for automated testing.
Data-driven approach for test data management
Integration of Selenium WebDriver for web automation
Utilization of TestNG for test case management and reporting
Q53. Selenium integration with JIRA
Selenium can be integrated with JIRA using JIRA API and Selenium WebDriver to automate test case execution and report defects directly from Selenium scripts.
Use JIRA API to interact with JIRA from Selenium scripts
Utilize Selenium WebDriver to automate test case execution and report defects
Integrate Selenium with JIRA to create a seamless testing and defect tracking process
Q54. Locators in Selenium
Locators in Selenium are used to identify web elements on a webpage for automation testing purposes.
Locators include ID, class name, name, tag name, link text, partial link text, and xpath.
ID is the most efficient locator as it is unique for each element.
Xpath is powerful but can be slow and brittle if not used correctly.
Using CSS selectors is preferred over xpath for better performance.
Locators can be used with findElement() and findElements() methods in Selenium.
Q55. Explain your framework
My framework is a data-driven framework using Selenium WebDriver and TestNG for automated testing.
Utilizes Selenium WebDriver for interacting with web elements
Uses TestNG for test case management and reporting
Employs data-driven approach for test data separation
Supports parallel execution for faster test runs
Q56. Counting Duplicates
Count the number of duplicate strings in an array
Iterate through the array and use a hashmap to store the count of each string
Check the hashmap for strings with count greater than 1 to find duplicates
Top HR Questions asked in Infosys Automation Test Engineer
Interview Process at Infosys Automation Test Engineer

Top Automation Test Engineer Interview Questions from Similar Companies








Reviews
Interviews
Salaries
Users/Month

