Add office photos
Engaged Employer

Cognizant

3.8
based on 47.8k Reviews
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

30+ Voltas Interview Questions and Answers

Updated 12 Dec 2024
Popular Designations

Q1. 5. Git repository . How to push and pull code.

Ans.

Git is a version control system. Push code to upload changes to a remote repository. Pull code to download changes from a remote repository.

  • To push code, use the command 'git push '. For example, 'git push origin master'.

  • To pull code, use the command 'git pull '. For example, 'git pull origin master'.

  • Make sure to commit changes before pushing code using the command 'git commit -m '.

  • Use 'git status' to check the status of your local repository.

  • Use 'git clone ' to clone a rem...read more

View 2 more answers

Q2. Mention some popular tools used for automation testing?

Ans.

Popular tools for automation testing include Selenium, Appium, JMeter, and TestComplete.

  • Selenium: widely used for web application testing

  • Appium: used for mobile application testing

  • JMeter: used for load testing and performance testing

  • TestComplete: used for desktop application testing

  • Other popular tools include Katalon Studio, Robot Framework, and Cucumber

View 1 answer

Q3. 2. TestNg and it's annotations and order of execution.

Ans.

TestNG is a testing framework for Java. Annotations like @Test, @BeforeMethod, @AfterMethod, etc. are used to define test cases and their order of execution.

  • @Test annotation is used to define a test case.

  • @BeforeMethod and @AfterMethod annotations are used to define pre and post conditions for each test case.

  • Test cases can be grouped using @Test annotation with 'groups' parameter.

  • Test cases can be prioritized using @Test annotation with 'priority' parameter.

  • Test cases can be e...read more

View 1 answer

Q4. 3. Selenium and it's method and different commands used.

Ans.

Selenium is a popular automation testing tool used for web applications. It has various methods and commands for testing.

  • Selenium WebDriver is used for automating web applications

  • findElement() method is used to locate an element on the web page

  • sendKeys() method is used to enter text into a text field

  • click() method is used to click on an element

  • getTitle() method is used to get the title of the web page

  • getText() method is used to get the text of an element

  • getAttribute() method ...read more

Add your answer
Discover Voltas interview dos and don'ts from real experiences

Q5. What is x path? And define locators

Ans.

XPath is a language used to locate elements on a web page. Locators are used to identify elements on a web page.

  • XPath is used to navigate through the HTML structure of a web page

  • XPath expressions can be used to locate elements based on their attributes, text content, or position on the page

  • Locators are used to identify elements on a web page, such as ID, class name, name, tag name, link text, and partial link text

Add your answer

Q6. How to identify object in Selenium

Ans.

To identify objects in Selenium, we use locators such as ID, Name, Class Name, XPath, CSS Selector, etc.

  • Locators are used to identify web elements on a page

  • ID and Name are the most commonly used locators

  • XPath and CSS Selector are more powerful but slower

  • Class Name is useful for identifying multiple elements with the same class

  • Locators can be used with findElement() and findElements() methods

  • Example: driver.findElement(By.id("username"));

Add your answer
Are these interview questions helpful?

Q7. what is feature and step definitions in cucumber BDD

Ans.

Feature files contain high-level description of the functionality to be tested, while step definitions are the implementation of the steps in the feature file using code.

  • Feature files are written in Gherkin syntax and describe the behavior of the application in plain text.

  • Step definitions are written in programming languages like Java, Ruby, etc., and map the steps in the feature file to automation code.

  • Feature files and step definitions together form the basis of Behavior Dr...read more

Add your answer

Q8. Difference between regression and retesting?

Ans.

Regression testing is testing the entire application after making changes, while retesting is testing only the failed test cases.

  • Regression testing is done to ensure that the changes made to the application have not affected the existing functionality.

  • Retesting is done to ensure that the defects found in the previous testing cycle have been fixed.

  • Regression testing is time-consuming and requires a lot of resources.

  • Retesting is less time-consuming and requires fewer resources....read more

View 1 answer
Share interview questions and help millions of jobseekers 🌟

Q9. what is static keyword?

Ans.

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 a class

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

  • Static blocks are used to initialize static variables

  • Static keyword can also be used to create nested classes

  • Example: public static int count = 0;

Add your answer

Q10. Can you please take xpath in dynamic way?

Ans.

Yes, dynamic xpath can be created using functions like contains, starts-with, and variables.

  • Use functions like contains() and starts-with() to create dynamic xpaths based on partial attribute values

  • Use variables to store dynamic values and use them in xpaths

  • Example: //div[contains(@class, 'dynamicClass')]

  • Example: //input[starts-with(@id, 'dynamicId')]

Add your answer

Q11. What would be return if multiple tabs are open

Ans.

The return would be the number of tabs open in the browser.

  • The return value would be an integer representing the count of open tabs.

  • For example, if there are 5 tabs open, the return value would be 5.

Add your answer

Q12. What is Test case, Test plan and Test Secenarios

Ans.

Test case is a set of conditions or variables under which a tester will determine whether a system under test satisfies requirements. Test plan is a document outlining the scope, approach, resources, and schedule of testing activities. Test scenarios are detailed descriptions of possible interactions with the system.

  • Test case: specific conditions to be tested, expected results, steps to execute

  • Test plan: overall strategy for testing, including objectives, resources, schedule

  • T...read more

Add your answer

Q13. How to convert JSON file into Java object

Ans.

Use libraries like Jackson or Gson to convert JSON file into Java object

  • Use libraries like Jackson or Gson for easy conversion

  • Create a POJO class that represents the structure of JSON data

  • Use ObjectMapper class in Jackson or Gson.fromJson() method to convert JSON file into Java object

Add your answer

Q14. Difference between implicit and explicit

Ans.

Implicit and explicit are two types of waits in Selenium.

  • Implicit wait is set globally and applied to all elements, while explicit wait is set for a specific element or condition.

  • Implicit wait waits for a certain amount of time before throwing an exception if the element is not found, while explicit wait waits for a specific condition to occur before proceeding.

  • Implicit wait is set using the 'driver.manage().timeouts().implicitlyWait()' method, while explicit wait is set usin...read more

Add your answer

Q15. Different types of exceptions while executing test cases

Ans.

Different types of exceptions encountered while executing test cases

  • 1. Checked exceptions: Must be caught or declared in the method signature

  • 2. Unchecked exceptions: Not required to be caught or declared

  • 3. Runtime exceptions: Occur during runtime due to logical errors

  • 4. Assertion errors: Failures in assertions made in the test cases

  • 5. Timeout exceptions: Test case takes longer than expected to complete

Add your answer

Q16. What is data provider in testNg?

Ans.

Data provider in TestNG is used to supply test data to test methods.

  • Data provider is a method annotated with @DataProvider that returns a 2D array of test data.

  • Test methods can be linked to data provider using 'dataProvider' attribute in @Test annotation.

  • Data provider helps in running the same test method with multiple sets of data.

  • It helps in data-driven testing where test data is separated from test logic.

Add your answer

Q17. Difference between absolute and relative Xpath

Ans.

Absolute Xpath starts from the root element, while relative Xpath starts from any node in the DOM structure.

  • Absolute Xpath starts with a single forward slash (/) and starts selection from the root node.

  • Relative Xpath starts with a double forward slash (//) and starts selection from the current node or any node in the DOM structure.

  • Absolute Xpath is more brittle and prone to breaking if the structure of the page changes, while relative Xpath is more flexible and resilient to c...read more

Add your answer

Q18. Write a program for string reverse?

Ans.

Program to reverse an array of strings

  • Iterate through each string in the array and reverse it using built-in functions or manual reversal logic

  • Store the reversed strings in a new array or overwrite the original array

  • Return the reversed array of strings

View 1 answer

Q19. What are the waits in selenium

Ans.

Types of waits in Selenium include Implicit Wait, Explicit Wait, and Fluent Wait.

  • Implicit Wait: Waits for a certain amount of time before throwing a NoSuchElementException.

  • Explicit Wait: Waits for a certain condition to occur before proceeding further in the code.

  • Fluent Wait: Waits for a condition to be true with a defined polling frequency.

  • Example: driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

Add your answer

Q20. How to input data in cucumber

Ans.

Data can be input in Cucumber using feature files and step definitions.

  • Data can be input in feature files using scenarios and scenario outlines

  • Step definitions can be used to define the actions to be taken with the input data

  • Data tables can be used in feature files to input structured data

  • Examples keyword can be used in scenario outlines to provide multiple sets of input data

Add your answer

Q21. Status code of api

Ans.

Status code of an API is a numerical code that indicates the success or failure of a request.

  • Status codes range from 100 to 599

  • 2xx codes indicate success

  • 4xx codes indicate client errors

  • 5xx codes indicate server errors

View 1 answer

Q22. Different annotations use in Junit hooks

Ans.

Different annotations used in JUnit hooks

  • Annotations like @Before, @After, @BeforeClass, @AfterClass are used in JUnit hooks

  • These annotations help in setting up and tearing down test fixtures before and after test methods

  • Example: @Before public void setUp() { // setup code }

Add your answer

Q23. what is meant by CRM?

Ans.

CRM stands for Customer Relationship Management. It refers to strategies, technologies, and practices that companies use to manage and analyze customer interactions and data throughout the customer lifecycle.

  • CRM helps businesses build and maintain relationships with customers

  • It involves using technology to organize, automate, and synchronize sales, marketing, customer service, and technical support

  • Examples of CRM software include Salesforce, HubSpot, and Zoho CRM

Add your answer

Q24. difference between findElement and findElements

Ans.

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 specified locator, while findElements returns a list of WebElements.

  • findElement will throw NoSuchElementException if no matching element is found, while findElements will return an empty list.

  • Example: driver.findElement(By.id("username")) vs driver.findElements(By.className("button"))

Add your answer

Q25. implicitwait and explicit wait difference

Ans.

Implicit wait is set globally for the entire duration of the WebDriver session, while explicit wait is applied only to specific elements.

  • Implicit wait is set using driver.manage().timeouts().implicitlyWait() method, while explicit wait is implemented using WebDriverWait class in Selenium.

  • 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 has a default timeou...read more

Add your answer

Q26. Java Program to reverse a number

Ans.

Java program to reverse a number

  • Use modulus operator to extract the last digit of the number

  • Multiply the reversed number by 10 and add the extracted digit

  • Repeat until all digits are processed

View 1 answer

Q27. Exceptions in selenium

Ans.

Exceptions in Selenium are errors that occur during test execution, disrupting the flow of the test script.

  • Exceptions are thrown when there is an unexpected behavior in the application under test or in the test script itself.

  • Common exceptions in Selenium include NoSuchElementException, ElementNotVisibleException, TimeoutException, and StaleElementReferenceException.

  • Handling exceptions in Selenium can be done using try-catch blocks or using Selenium's built-in exception handli...read more

Add your answer

Q28. Background keyword in BDD

Ans.

Background keyword in BDD is used to define preconditions for a scenario

  • Background keyword is used to define steps that are common to all scenarios in a feature file

  • It helps in reducing duplication of steps in scenarios

  • Background keyword is placed before the first scenario in a feature file

Add your answer

Q29. Syntax of Drag and Drop

Ans.

Drag and Drop is a common interaction in web applications where a user can click and drag an element to a new location.

  • Drag and Drop is implemented using HTML5's Drag and Drop API.

  • The syntax involves setting the draggable attribute to true on the element you want to drag.

  • You also need to define event handlers for dragstart, dragover, and drop events.

  • Example:

    Drag me!

Add your answer

Q30. Syntax for Pinch and zoom

Ans.

Pinch and zoom syntax is used to zoom in and out on touch screen devices.

  • Use two fingers to pinch inwards to zoom out

  • Use two fingers to pinch outwards to zoom in

  • For zooming, use the 'transform' property in CSS

Add your answer

Q31. Oops Concept from Java

Ans.

Oops Concept from 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 involves bundling data and methods that operate on the data into a single unit.

  • Polymorphism allows objects to be treated as instances of their parent class.

  • Abstraction hides the implementation details and only shows the necessary features to the outs...read more

Add your answer

Q32. Hooks in Java

Ans.

Hooks in Java are methods that allow subclasses to override or extend the behavior of a superclass.

  • Hooks are commonly used in frameworks like JUnit and TestNG for test automation.

  • They are often used for setup and teardown operations before and after test methods.

  • Examples include @Before, @After, @BeforeClass, and @AfterClass annotations in JUnit.

Add your answer

Q33. auth vs autentication

Ans.

Authentication is the process of verifying the identity of a user, while authorization is the process of determining what resources a user can access.

  • Authentication verifies the identity of a user, usually through a username and password.

  • Authorization determines what resources a user can access after they have been authenticated.

  • Authentication is the first step in the security process, while authorization comes after authentication.

  • Example: Logging into a website requires aut...read more

Add your answer

More about working at Cognizant

Top Rated Mega Company - 2024
Top Rated IT/ITES Company - 2024
HQ - Teaneck. New Jersey., United States (USA)
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Voltas

based on 11 interviews in the last 1 year
1 Interview rounds
Technical Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Automation Test Engineer Interview Questions from Similar Companies

3.8
 • 58 Interview Questions
3.7
 • 54 Interview Questions
3.7
 • 50 Interview Questions
3.9
 • 31 Interview Questions
3.4
 • 18 Interview Questions
3.9
 • 10 Interview Questions
View all
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
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

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