CoverPhoto
Infosys logo
Premium Employer

Infosys

Verified
3.6
based on 39.3k Reviews
Filter interviews by
Automation Test Engineer
Fresher
Experienced
Skills
Clear (1)

50+ Infosys Automation Test Engineer Interview Questions and Answers

Updated 8 Feb 2025

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.

Ans.

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

View 1 answer
right arrow

Q2. 3. What are different types of waits in selenium.

Ans.

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

View 1 answer
right arrow
Infosys Automation Test Engineer Interview Questions and Answers for Freshers
illustration image

Q3. 2.How to execute test cases in parallel.

Ans.

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

View 1 answer
right arrow

Q4. What are the challenges in selenium

Ans.

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

Add your answer
right arrow
Discover Infosys interview dos and don'ts from real experiences

Q5. 1. Automation Framework used in project.

Ans.

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

View 1 answer
right arrow

Q6. Write left star pattern in java? How to run parallel test cases in automation testing? What are different annotation used in TestNG?

Ans.

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

Add your answer
right arrow
Are these interview questions helpful?

Q7. how to handle broken links in selenium

Ans.

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

Add your answer
right arrow

Q8. Which method you use to remove spaces in the string

Ans.

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

Add your answer
right arrow
Share interview questions and help millions of jobseekers 🌟
man with laptop

Q9. What kind of bugs you will encounter in API testing

Ans.

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

Add your answer
right arrow

Q10. What is difference between authorization and authentication?

Ans.

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

Add your answer
right arrow

Q11. Can you explain the Maven build lifecycle?

Ans.

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

Add your answer
right arrow

Q12. Write java locator to get all elements in the webpage

Ans.

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

View 2 more answers
right arrow

Q13. Payment failure by debit card in e-commerce site? Make test scenarios?

Ans.

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

Add your answer
right arrow

Q14. What is the difference implicit wait and explicit wait

Ans.

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

Add your answer
right arrow

Q15. What is the difference between selenium 3 and selenium4

Ans.

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

Add your answer
right arrow

Q16. Tell all webdriver exceptions

Ans.

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

Add your answer
right arrow

Q17. What is the code to reverse a sentence?

Ans.

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

View 1 answer
right arrow

Q18. What is code for reverse a digit?

Ans.

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

View 1 answer
right arrow

Q19. How to take screenshot when a test case is failed

Ans.

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

Add your answer
right arrow

Q20. Difference between agile and waterfall based model?

Ans.

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

Add your answer
right arrow

Q21. 4.Limitation of selenium.

Ans.

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

View 1 answer
right arrow

Q22. What is exclude and include in TestNG?

Ans.

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"})

Add your answer
right arrow

Q23. Challenges faced during commit code in Version control

Ans.

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

Add your answer
right arrow

Q24. How to check the password is encrypted

Ans.

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

Add your answer
right arrow

Q25. What are HTTP methods in API Testing?

Ans.

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

Add your answer
right arrow

Q26. Where u used oops concepts in ur framework

Ans.

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

Add your answer
right arrow

Q27. How to get URL of webpage

Ans.

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)

View 1 answer
right arrow

Q28. 5.Enum in java.

Ans.

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;

Add your answer
right arrow

Q29. how postman helps for api testing

Ans.

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

Add your answer
right arrow

Q30. purpose of pass, break and continue keywords

Ans.

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.

View 2 more answers
right arrow

Q31. Automation some online platforms within 3 mins of time

Ans.

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

Add your answer
right arrow

Q32. Http operation you worked on

Ans.

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

Add your answer
right arrow

Q33. Difference between test cases and test scenarios?

Ans.

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

Add your answer
right arrow

Q34. What is static block in java?

Ans.

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"); }

Add your answer
right arrow

Q35. One Task Repetition of Characters count logic

Ans.

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

Add your answer
right arrow

Q36. Dynamic webElements handling using Xpath?

Ans.

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

Add your answer
right arrow

Q37. Why string immutable in java ?

Ans.

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.

Add your answer
right arrow

Q38. Agile Process (Agile vs Waterfall model)

Ans.

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

Add your answer
right arrow

Q39. Write a code for febonacci series

Ans.

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

View 1 answer
right arrow

Q40. What is spike in agile?

Ans.

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.

Add your answer
right arrow

Q41. what is Test closure?

Ans.

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

Add your answer
right arrow

Q42. Write a program to reverse a string.

Ans.

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.

Add your answer
right arrow

Q43. Threads in soap ui

Ans.

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

View 1 answer
right arrow

Q44. How to handle POPUPS

Ans.

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

Add your answer
right arrow

Q45. What is polymorphism

Ans.

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.

Add your answer
right arrow

Q46. What is interface

Ans.

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

Add your answer
right arrow

Q47. Selenium vs Selenium Webdriver

Ans.

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

Add your answer
right arrow

Q48. what is postman

Ans.

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.

Add your answer
right arrow

Q49. testplan Vs test strategy

Ans.

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

Add your answer
right arrow

Q50. Sprint point system? Explain?

Ans.

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).

Add your answer
right arrow

Q51. Explain Python OOPS Concepts

Ans.

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

View 1 answer
right arrow

Q52. Describe Your Framework

Ans.

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

Add your answer
right arrow

Q53. Selenium integration with JIRA

Ans.

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

Add your answer
right arrow

Q54. Locators in Selenium

Ans.

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.

Add your answer
right arrow

Q55. Explain your framework

Ans.

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

Add your answer
right arrow

Q56. Counting Duplicates

Ans.

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

Add your answer
right arrow
Contribute & help others!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos

Interview Process at Infosys Automation Test Engineer

based on 30 interviews
2 Interview rounds
Technical Round - 1
Technical Round - 2
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Automation Test Engineer Interview Questions from Similar Companies

View all
Recently Viewed
JOBS
Browse jobs
Discover jobs you love
JOBS
Browse jobs
Discover jobs you love
CAMPUS PLACEMENT
Sathyabama University
SALARIES
Bosch Global Software Technologies
INTERVIEWS
Infosys
600 top interview questions
INTERVIEWS
Infosys
30 top interview questions
INTERVIEWS
TCS
200 top interview questions
JOBS
Capgemini
No Jobs
INTERVIEWS
Infosys
No Interviews
DESIGNATION
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter