Premium Employer

HCLTech

3.6
based on 33.6k Reviews
Filter interviews by

Interview Questions and Answers

Updated 15 Sep 2024
Popular Designations

Q1. what are the different http codes used in rest assure?

Ans.

Different HTTP codes used in Rest Assured

  • 200 - OK: Request was successful

  • 201 - Created: Request was successful and a new resource was created

  • 400 - Bad Request: Request was invalid

  • 401 - Unauthorized: Request requires user authentication

  • 404 - Not Found: Requested resource was not found

  • 500 - Internal Server Error: Server encountered an unexpected condition

Add your answer

Q2. Write a program to print 2 nd highest number from array with using sorting?

Ans.

Program to find 2nd highest number in array without sorting.

  • Iterate through array to find highest and second highest numbers

  • Initialize variables to store highest and second highest numbers

  • Compare each element with highest and second highest numbers

Add your answer

Q3. What are main concepts of OOPS in java?

Ans.

Main concepts of OOPS in Java include inheritance, encapsulation, polymorphism, and abstraction.

  • Inheritance: Allows a class to inherit properties and behavior from another class. Example: class B extends class A.

  • Encapsulation: Bundling data and methods that operate on the data into a single unit. Example: private variables with public getter and setter methods.

  • Polymorphism: Ability of a method to do different things based on the object it is acting upon. Example: method overl...read more

Add your answer

Q4. write a program to add value into hashmap?

Ans.

Program to add values into a hashmap in Java.

  • Create a new HashMap object.

  • Use the put() method to add key-value pairs into the hashmap.

  • Keys must be unique, values can be duplicated.

  • Example: HashMap map = new HashMap<>(); map.put("A", 1);

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

Q5. Write a code using rest assure for status code

Ans.

Code using Rest Assured for checking status code

  • Import Rest Assured library

  • Use given() method to specify the base URI

  • Use when() method to specify the HTTP method and endpoint

  • Use then() method to validate the status code

Add your answer

Q6. how to handle frames in selenium

Ans.

Frames in Selenium are handled using switchTo() method to navigate between frames within a webpage.

  • Use driver.switchTo().frame() method to switch to a frame by index, name, or WebElement

  • To switch back to the default content, use driver.switchTo().defaultContent()

  • Nested frames can be handled by switching to parent frame first before switching to child frame

  • Example: driver.switchTo().frame(0); // Switch to frame by index

Add your answer

Q7. how to handle windows

Ans.

Handling windows in automation testing involves identifying and interacting with different types of windows that appear during test execution.

  • Use window handles to switch between different windows

  • Identify windows using unique attributes like title or handle

  • Interact with windows by sending keys or clicking on elements within the window

Add your answer

Q8. Oppps concept in selenium

Ans.

In Selenium, OOPs concept refers to using Object-Oriented Programming principles like inheritance, encapsulation, polymorphism, and abstraction.

  • Selenium supports OOPs concepts like inheritance, where one class can inherit properties and methods from another class.

  • Encapsulation is achieved in Selenium by using access modifiers to restrict access to certain methods and variables.

  • Polymorphism allows Selenium to perform different actions based on the object being tested.

  • Abstracti...read more

Add your answer

Q9. oops concept in selenium

Ans.

In Selenium, OOPs concepts like inheritance, polymorphism, encapsulation, and abstraction can be implemented using classes and objects.

  • Selenium supports object-oriented programming principles like inheritance, where one class can inherit properties and methods from another class.

  • Polymorphism can be achieved in Selenium by using method overloading or overriding.

  • Encapsulation is implemented in Selenium by hiding the internal details of a class and exposing only necessary method...read more

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

Interview Process at null

based on 4 interviews in the last 1 year
Interview experience
3.8
Good
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
 • 54 Interview Questions
3.9
 • 20 Interview Questions
3.4
 • 18 Interview Questions
3.6
 • 16 Interview Questions
3.4
 • 10 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