Add office photos
Engaged Employer

TCS

3.7
based on 85.5k Reviews
Filter interviews by

10+ 3M ANSR Global Technology Center Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. If text box is disabled how will you pass value in that text box

Ans.

Value cannot be passed in a disabled text box.

  • Check if there is any other way to pass the value, such as through a different input field.

  • If not, enable the text box temporarily, pass the value, and then disable it again.

  • Alternatively, check if there is any JavaScript code that can be used to pass the value.

Add your answer

Q2. Which all exceptions you get while running scripts

Ans.

Exceptions while running scripts

  • Syntax errors

  • Runtime errors

  • Logical errors

  • Timeout errors

  • Memory errors

Add your answer

Q3. Implicit and Explicit wait with syntax/ Waits in selenium

Ans.

Implicit and Explicit waits are used in Selenium to wait for elements to load before performing actions.

  • Implicit wait waits for a specified amount of time before throwing an exception if the element is not found.

  • Explicit wait waits for a specific condition to be met before proceeding with the next step.

  • Syntax for implicit wait: driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

  • Syntax for explicit wait: WebDriverWait wait = new WebDriverWait(driver, 10); wait.unt...read more

Add your answer

Q4. How to take screenshot in selenium

Ans.

Screenshots can be taken in Selenium using the TakesScreenshot interface.

  • Create an object of the TakesScreenshot interface

  • Call the getScreenshotAs() method on the driver object

  • Save the screenshot to a desired location using the File class

Add your answer
Discover 3M ANSR Global Technology Center interview dos and don'ts from real experiences

Q5. How you pass Test data in testNG

Ans.

Test data can be passed in testNG using DataProvider annotation.

  • Create a method that returns a two-dimensional array of test data

  • Annotate the test method with @DataProvider and specify the name of the data provider method

  • Pass the test data as parameters to the test method

Add your answer

Q6. Difference between x-path and css selector

Ans.

XPath and CSS selectors are both used to locate elements on a web page, but they have different syntax and capabilities.

  • XPath uses a path expression to navigate through the HTML structure, while CSS selectors use a pattern matching approach.

  • XPath can select elements based on their attributes, text content, and position in the document, while CSS selectors are limited to attributes and tag names.

  • XPath has a wider range of operators and functions for complex queries, while CSS ...read more

Add your answer
Are these interview questions helpful?

Q7. How to select values in Dropdowns

Ans.

To select values in Dropdowns, click on the dropdown menu and choose the desired option from the list.

  • Click on the dropdown menu to open the list of options

  • Scroll or use arrow keys to navigate through the options

  • Click on the desired option to select it

  • Some dropdowns may have a search bar to filter options

Add your answer

Q8. How to handle IFrames/Window handles

Ans.

IFrames/Window handles can be handled using switchTo() method in Selenium

  • Use driver.switchTo().frame() method to switch to an IFrame

  • Use driver.switchTo().defaultContent() method to switch back to the main page

  • Use driver.getWindowHandles() method to get all window handles

  • Use driver.switchTo().window() method to switch to a new window

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. Difference between Abstract and Interface

Ans.

Abstract classes are classes that cannot be instantiated and can have both abstract and non-abstract methods. Interfaces are contracts that define a set of methods that a class must implement.

  • Abstract classes can have constructors while interfaces cannot

  • A class can implement multiple interfaces but can only inherit from one abstract class

  • Abstract classes can have instance variables while interfaces cannot

  • Interfaces can have default methods while abstract classes cannot

  • Abstrac...read more

Add your answer

Q10. What is Page Object model

Ans.

Page Object Model is a design pattern used in test automation to create an object repository for web UI elements.

  • It separates the test code from the page-specific code.

  • It improves code maintainability and reduces code duplication.

  • It allows for easy modification of UI elements without affecting the test code.

  • It enhances test script readability and reduces the effort required to create new test scripts.

  • It is widely used in Selenium-based test automation frameworks.

Add your answer

Q11. Difference between Assert and Verify

Ans.

Assert checks if a condition is true and stops the test if it's false. Verify checks if a condition is true and continues the test if it's false.

  • Assert is used to validate the expected result of a test case.

  • Verify is used to validate the actual result of a test case.

  • Assert stops the test execution if the condition is false.

  • Verify continues the test execution if the condition is false.

  • Assert is used for critical test cases.

  • Verify is used for non-critical test cases.

Add your answer

Q12. What is V-model

Ans.

V-model is a software development model that emphasizes testing at every stage of the development process.

  • It is a sequential development process

  • Each stage has a corresponding testing stage

  • Testing is done at every stage to ensure quality

  • It is a highly structured and disciplined approach

  • It is often used in safety-critical industries such as aerospace and defense

Add your answer

Q13. Annotations in TestNG

Ans.

Annotations in TestNG are used to provide additional information to the test methods and control the test execution flow.

  • Annotations are used to mark a method as a test method, configuration method, or to specify the order of execution.

  • TestNG provides several built-in annotations such as @Test, @BeforeSuite, @AfterSuite, @BeforeTest, @AfterTest, etc.

  • Annotations can also be used to group tests, enable/disable tests, and set priority for test methods.

  • Custom annotations can also...read more

Add your answer

Q14. Locators in selenium

Ans.

Locators in Selenium are used to identify web elements on a web page.

  • Locators can be based on ID, class name, name, tag name, link text, partial link text, CSS selector, or XPath.

  • Using the right locator strategy is important for reliable test automation.

  • Examples of locators: driver.findElement(By.id("elementId")), driver.findElement(By.className("className")), driver.findElement(By.xpath("//tagName[@attribute='value']"))

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
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