Automation Engineer

300+ Automation Engineer Interview Questions and Answers

Updated 4 Dec 2024

Popular Companies

search-icon

Q51. Difference in public static void main (String[] args) and public static void main ()

Ans.

The difference between public static void main (String[] args) and public static void main () is the presence of command line arguments.

  • public static void main (String[] args) is used when command line arguments are required

  • public static void main () is used when command line arguments are not required

  • String[] args is an array of strings that contains any command line arguments passed to the program

  • The absence of String[] args in public static void main () means that the prog...read more

Q52. How many hooks are there in the cucumber Framework

Ans.

There are 23 hooks in the Cucumber Framework.

  • Hooks are used to perform actions before or after scenarios or steps.

  • There are 7 types of hooks in Cucumber: Before, After, BeforeStep, AfterStep, BeforeAll, AfterAll, and Around.

  • Examples of hook usage include setting up test data, closing browser sessions, and logging test results.

Q53. How to automate hybrid and native mobile applications

Ans.

To automate hybrid and native mobile applications, use tools like Appium and Selenium for testing and UI automation.

  • Use Appium for automating native and hybrid mobile apps

  • Use Selenium for automating web views in hybrid apps

  • Identify elements using unique identifiers like resource-id, class name, etc.

  • Use XPath or CSS selectors to locate elements

  • Write test scripts in programming languages like Java, Python, etc.

  • Use emulators or real devices for testing

  • Perform functional, perform...read more

Q54. Which is valid or invalid a. ChromeDriver driver=new ChromeDriver(); b. WebDriver driver=new ChromeDriver(); c. WebDriver driver2=new WebDriver(); driver2=new ChromeDriver();

Ans.

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

Are these interview questions helpful?

Q55. Write the program to take the input from the user as string array and remove all vowels from the string

Ans.

Program to remove vowels from string array input by user

  • Iterate through each string in the array

  • For each string, iterate through each character and remove vowels

  • Use a function to check if a character is a vowel (e.g. 'aeiouAEIOU')

Q56. 1. What is SCADA? 2. What is the type of PLC logic Development? 3. Reporting Knowledge. 4. MSSQL Knowledge. 5. How many types of Motors? 6. Brief about communication protocol in PLC.

Ans.

SCADA stands for Supervisory Control and Data Acquisition. It is a system used for monitoring and controlling industrial processes.

  • SCADA is used in industries such as power plants, water treatment facilities, and manufacturing plants.

  • PLC logic development can be done using ladder logic, function block diagrams, and structured text.

  • Reporting knowledge involves generating reports on system performance and data analysis.

  • MSSQL knowledge is important for storing and retrieving dat...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q57. type script and java script arrow function loops if else condition

Ans.

Explaining type script and java script arrow function loops with if else condition.

  • TypeScript and JavaScript both support arrow functions for concise syntax.

  • Arrow functions can be used in loops to simplify code.

  • If-else conditions can be used with arrow functions to add logic.

  • Example: const numbers = [1, 2, 3]; numbers.forEach(num => {if(num % 2 === 0) {console.log(num + ' is even');} else {console.log(num + ' is odd');}});

Q58. what is the difference between throw and throws in Java?

Ans.

throw is used to throw an exception in Java, while throws is used to declare an exception that a method might throw.

  • throw is used to explicitly throw an exception within a method.

  • throws is used in the method signature to declare that the method might throw a specific type of exception.

  • Example: throw new Exception("An error occurred!");

  • Example: public void method() throws IOException {}

Automation Engineer Jobs

Automation Engineer 6-10 years
Cargill India Pvt. Ltd.
4.1
Kolkata
Automation Engineer 5-10 years
Air India
3.8
Gurgaon / Gurugram
Senior Engineer-Automation 2-3 years
Allianz
4.3
Thiruvananthapuram

Q59. MHS , when man Power not then you will support team

Ans.

I will support the team by taking on additional responsibilities and tasks to ensure the project or task is completed successfully.

  • Take on additional responsibilities to fill in for the lack of manpower

  • Collaborate with team members to distribute workload effectively

  • Provide guidance and assistance to team members as needed

  • Prioritize tasks and deadlines to ensure project completion

  • Communicate effectively with team members and stakeholders

Q60. Give a setuation and how can I handle and fix the problem

Ans.

Handling a situation where a critical test case fails during automation testing

  • Identify the root cause of the failure by analyzing logs and error messages

  • Update the test case script to fix the issue

  • Re-run the test case to ensure it passes successfully

  • Document the issue and resolution for future reference

Q61. difference between getwindowhandle and getwindowhandles() and what is output type

Ans.

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

Q62. Coding: take your name as input. Print them letter by letter and print if vowels repeat in your name.

Ans.

The code takes a name as input, prints each letter, and checks if any vowels repeat in the name.

  • Create a function that takes a string input for the name

  • Iterate through each letter in the name and print them individually

  • Check for vowel repetition by keeping track of vowels encountered

Q63. 13) Unicast & multicating in produce consume tag

Ans.

Unicast and multicast are communication methods used in produce consume tag.

  • Unicast is a one-to-one communication method where a message is sent to a single recipient.

  • Multicast is a one-to-many communication method where a message is sent to multiple recipients.

  • Produce consume tag is a mechanism used in automation systems to communicate between producers and consumers.

  • Unicast is used when the producer needs to send a message to a specific consumer.

  • Multicast is used when the p...read more

Q64. 1.Different between plc&pc 2. Type of motor. 3. Plc i/o 4. instructions of PLC. 5. relay and contactor 6. Preventive maintenance and predicative maintenance.

Ans.

Questions related to PLC, motors, and maintenance in automation engineering.

  • PLC is a programmable logic controller used for automation, while PC is a personal computer used for general purposes.

  • Types of motors include AC, DC, servo, stepper, etc.

  • PLC I/O refers to the input/output modules used to connect sensors and actuators to the PLC.

  • PLC instructions include ladder logic, function block diagrams, structured text, etc.

  • Relays and contactors are used for switching high voltage...read more

Q65. What are the most used locators?

Ans.

The most used locators in automation testing are ID, class name, name, xpath, and CSS selector.

  • ID: Unique identifier for an element

  • Class name: Name of the class attribute of an element

  • Name: Name attribute of an element

  • XPath: Path of the element in the XML document

  • CSS selector: Selector based on CSS attributes

Q66. How to get random mobile for 10 user using python in robot framework

Ans.

Use Python in Robot Framework to generate random mobile numbers for 10 users.

  • Use the Faker library in Python to generate random mobile numbers

  • Create a loop to generate mobile numbers for 10 users

  • Implement the logic in a Robot Framework test case

Q67. Are you ok with testing background as ur resume is of dev?

Ans.

Yes, I am comfortable with testing as well as development.

  • I have experience in both testing and development roles.

  • I believe that having a background in development can actually enhance my testing skills.

  • I am open to learning and adapting to new challenges in the testing field.

Q68. What is the different between IEC61850 & MODBUS

Ans.

IEC61850 is a communication protocol for power systems, while MODBUS is a general-purpose protocol for industrial automation.

  • IEC61850 is designed specifically for communication between devices in power systems, while MODBUS can be used in a variety of industrial applications.

  • IEC61850 uses a hierarchical data model, while MODBUS uses a flat data model.

  • IEC61850 supports peer-to-peer communication, while MODBUS uses a master-slave architecture.

  • IEC61850 has built-in support for t...read more

Q69. 5.Can you tell me how to find the dynamic Xpath

Ans.

To find dynamic Xpath, inspect the element and identify its unique attributes.

  • Inspect the element using browser developer tools

  • Identify unique attributes like class, id, name, etc.

  • Use these attributes to create a dynamic Xpath

  • Use functions like contains(), starts-with(), etc. to make the Xpath more dynamic

Q70. How many ports are available in ML1400?

Ans.

The ML1400 has 20 digital I/O ports and 2 analog I/O ports.

  • The ML1400 has a total of 22 ports.

  • There are 20 digital I/O ports that can be used for input or output of digital signals.

  • There are 2 analog I/O ports that can be used for input or output of analog signals.

  • These ports can be used to connect sensors, actuators, and other devices to the ML1400.

Q71. What are the different types of valves?

Ans.

Valves are devices used to control the flow of fluids or gases. There are several types of valves used in different applications.

  • Gate valves

  • Globe valves

  • Ball valves

  • Butterfly valves

  • Check valves

  • Diaphragm valves

  • Needle valves

  • Pinch valves

  • Pressure relief valves

  • Solenoid valves

Q72. Puzzle on getting 3L of water when provided 2L and 5L of water bottles. something like that

Ans.

Using 2L and 5L water bottles, you can measure 3L of water.

  • Fill the 5L bottle completely.

  • Pour the water from the 5L bottle into the 2L bottle until it is full.

  • Now, the 5L bottle has 3L of water remaining.

  • Empty the 2L bottle.

  • Pour the 3L of water from the 5L bottle into the empty 2L bottle.

  • Fill the 5L bottle again.

  • Pour water from the 5L bottle into the 2L bottle until it is full.

  • Now, the 5L bottle has 4L of water remaining.

  • Transfer 1L of water from the 5L bottle to the 2L bottl...read more

Q73. What are the Central debouncing mechanisms in DEM?

Ans.

Central debouncing mechanisms in DEM are used to eliminate false triggering of signals.

  • DEM stands for Digital Engine Management.

  • Central debouncing mechanisms are used to filter out noise and eliminate false triggering of signals.

  • These mechanisms include hardware and software filters.

  • Hardware filters include capacitors and resistors.

  • Software filters include algorithms that analyze the signal and remove noise.

  • Examples of signals that require debouncing include throttle position...read more

Q74. How do you check the OS on which the selenium program is running

Ans.

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

Q75. How to run 50 test cases if we have 100 test cases

Ans.

You can divide the test cases into two batches and run them separately.

  • Divide the 100 test cases into two batches of 50 each

  • Run the first batch of 50 test cases

  • Once the first batch is completed, run the second batch of 50 test cases

Q76. What are the languague u know in plc programming.

Ans.

I am proficient in ladder logic and structured text programming languages for PLCs.

  • Ladder logic is a graphical programming language commonly used in PLCs.

  • Structured text is a high-level programming language used for complex logic and calculations.

  • I am also familiar with function block diagrams and sequential function charts.

  • I have experience with PLC programming software such as Siemens TIA Portal and Allen-Bradley Studio 5000.

  • I am constantly learning and staying up-to-date w...read more

Q77. 10.Write a querry for second largest salary and nth salary

Ans.

Query for second largest and nth salary

  • Use ORDER BY and LIMIT to get second largest salary

  • Use OFFSET and LIMIT to get nth salary

  • Example: SELECT salary FROM employees ORDER BY salary DESC LIMIT 1,1

  • Example: SELECT salary FROM employees ORDER BY salary DESC LIMIT n-1,1

Q78. Find the combained charected in the given testing exmple : " Testing Testing Testing" , cobained text is "te"

Ans.

The combined characters in the given testing example 'Testing Testing Testing' is 'te'.

  • Iterate through the text and check for consecutive characters 'te'.

  • Combine the characters 'te' whenever they are found together.

  • Return the combined text 'te' as the result.

Q79. Program to sort the input in descending order without using inbuild method/functions

Ans.

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

Q80. Write the program to swap the two values without using third variable

Ans.

Swap two values without using a third variable in a program

  • Use bitwise XOR operation to swap two values without using a third variable

  • Example: int a = 5, b = 10; a = a ^ b; b = a ^ b; a = a ^ b; // Now a = 10, b = 5

  • Ensure the values are of the same data type for bitwise XOR operation to work correctly

Q81. sort the list of a given array of strings

Ans.

Sort a given array of strings

  • Use built-in sorting functions in programming languages

  • Implement sorting algorithms like bubble sort, merge sort, etc.

  • Consider case sensitivity and special characters

Q82. What are sensors and explain the working of the sensors

Ans.

Sensors are devices that detect and respond to physical stimuli, converting them into electrical signals.

  • Sensors can detect various physical properties such as temperature, pressure, light, sound, and motion.

  • They work by converting the physical stimulus into an electrical signal that can be measured and analyzed.

  • Different types of sensors use different mechanisms to detect physical stimuli, such as thermocouples for temperature, piezoelectric crystals for pressure, and photod...read more

Q83. what framework you are using in your project?

Ans.

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

Q84. How will you handle multiple windows in Selenium?

Ans.

Handling multiple windows in Selenium can be achieved using window handles.

  • Use getWindowHandles() method to get all window handles

  • Switch between windows using switchTo().window() method

  • Perform actions on each window as needed

Q85. what is 204 , 400 response code in REST apis?

Ans.

204 and 400 are HTTP response codes in REST APIs indicating success and client error, respectively.

  • 204 response code indicates that the server has successfully fulfilled the request and there is no content to send in the response.

  • 400 response code indicates that the server could not understand the request due to bad syntax or missing required parameters.

  • Example: If a client sends a request to update a resource and the request is successful with no content to return, the serve...read more

Q86. What are the 3 sub components in DCM?

Ans.

DCM stands for Data Center Management. The 3 sub components are power, cooling, and space.

  • DCM is used to manage and optimize data center resources.

  • Power sub component deals with managing power consumption and distribution.

  • Cooling sub component deals with managing temperature and humidity levels.

  • Space sub component deals with managing physical space and layout of equipment.

  • Examples of DCM software include Schneider Electric's StruxureWare and Emerson Network Power's Trellis.

Q87. What is the difference between SCADA and HMI?

Ans.

SCADA is a supervisory control system that monitors and controls industrial processes, while HMI is a graphical interface that allows operators to interact with the system.

  • SCADA is used for large-scale systems, while HMI is used for smaller systems.

  • SCADA is used for monitoring and control, while HMI is used for data visualization and interaction.

  • SCADA is typically used in industrial settings, while HMI is used in a variety of settings, including home automation and medical de...read more

Q88. In which programming language you are comfortable

Ans.

I am comfortable with multiple programming languages, including Python, Java, and C++.

  • Proficient in Python for automation scripting

  • Experience with Java for backend development

  • Knowledge of C++ for system programming

  • Comfortable switching between languages based on project requirements

Q89. What is joins and explain about its types

Ans.

Joins are used to combine rows from two or more tables based on a related column between them.

  • Types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.

  • INNER JOIN returns rows when there is at least one match in both tables.

  • LEFT JOIN returns all rows from the left table and the matched rows from the right table.

  • RIGHT JOIN returns all rows from the right table and the matched rows from the left table.

  • FULL JOIN returns rows when there is a match in one of the tabl...read more

Q90. Write a code to find occureence of a character in a given string

Ans.

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

Q91. why analog outputs in 4-20 mA range

Ans.

Analog outputs in 4-20 mA range are commonly used in industrial automation for their reliability, noise immunity, and ease of implementation.

  • 4-20 mA signals are less susceptible to noise interference compared to voltage signals.

  • The 4-20 mA range allows for easy detection of faults in the system, as a 0 mA signal indicates a broken wire or device failure.

  • These signals can travel long distances without significant signal loss, making them ideal for industrial environments.

  • Many ...read more

Q92. How to handling exception in your framework

Ans.

Exceptions can be handled using try-catch blocks in the framework.

  • Identify the potential exceptions that can occur in the framework

  • Use try-catch blocks to handle the exceptions

  • Log the exception details for debugging purposes

  • Throw custom exceptions for better error handling

  • Implement retry mechanism for recoverable exceptions

Q93. Write a java program for add this number 6134 and total will be 14

Ans.

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

Q94. Coding give the count of upper case and lower case letters in a string

Ans.

Count the number of upper case and lower case letters in a string using coding.

  • Iterate through each character in the string and check if it is upper case or lower case using built-in functions or ASCII values.

  • Keep track of the count of upper case and lower case letters separately.

  • Return the counts of upper case and lower case letters.

Q95. What is Automation?

Ans.

Automation is the use of technology to perform tasks without human intervention.

  • Automation involves the use of software, hardware, and other technologies to perform tasks.

  • It can be used to increase efficiency, reduce errors, and save time and money.

  • Examples include automated manufacturing processes, robotic assembly lines, and automated testing.

  • Automation can also be used in industries such as finance, healthcare, and transportation.

  • It requires careful planning, design, and i...read more

Q96. Define transformer and why use transformer

Ans.

A transformer is an electrical device that transfers electrical energy from one circuit to another through electromagnetic induction.

  • Transformers are used to increase or decrease the voltage of an alternating current (AC) power supply.

  • They are used in power distribution systems to step up the voltage for long-distance transmission and step it down for local distribution.

  • Transformers are also used in electronic devices to isolate circuits, match impedances, and provide galvani...read more

Q97. 1)Tasks in PLC programming

Ans.

PLC programming tasks involve designing, coding, testing, and maintaining programs for industrial automation systems.

  • Designing and coding ladder logic diagrams

  • Testing and debugging programs

  • Maintaining and updating existing programs

  • Collaborating with other engineers and technicians

  • Documenting programs and processes

Q98. Explain about Static Keywords ,Method, Variable with e.g.

Ans.

Explanation of static keywords, methods, and variables with examples.

  • Static keyword is used to declare a variable or method that belongs to the class rather than an instance of the class.

  • Static variables are shared among all instances of the class.

  • Static methods can be called without creating an instance of the class.

  • Example: public static int count = 0; // static variable

  • Example: public static void printMessage() { // static method }

Q99. How to integrate step defination with feature file

Ans.

Step definitions can be integrated with feature files using Cucumber in automation testing.

  • Create step definitions in a separate file using the same language as the feature file (e.g. Java for Cucumber-JVM).

  • Map step definitions to feature file scenarios using annotations like @Given, @When, @Then.

  • Use regular expressions to match step definitions with steps in the feature file.

  • Run the feature file with the step definitions to execute the automation tests.

Q100. Static block in java, program to find duplicates from a given string in java

Ans.

Static block is used to initialize static variables. Program to find duplicates in a string involves using a HashMap to store characters and their counts.

  • Create a HashMap to store characters and their counts

  • Iterate through the string and update the counts in the HashMap

  • Iterate through the HashMap and print characters with count > 1 as duplicates

Previous
1
2
3
4
5
6
7
Next
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 10k Interviews
3.9
 • 7.8k Interviews
3.7
 • 7.3k Interviews
3.8
 • 5.4k Interviews
3.7
 • 5.2k Interviews
3.8
 • 4.6k Interviews
3.6
 • 3.6k Interviews
4.2
 • 395 Interviews
3.2
 • 94 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Automation Engineer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

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