Bajaj Finserv
BOKEH ads Interview Questions and Answers
Q1. What is selenium wait. Explain how will you handle AJAX calls
Selenium wait is used to pause the execution of the test script for a specified amount of time. Handling AJAX calls involves using explicit waits to ensure the page is fully loaded before interacting with elements.
Use WebDriverWait in Selenium to wait for a specific condition to be met before proceeding with the test
Use ExpectedConditions to wait for elements to be present, visible, clickable, etc.
Handle AJAX calls by waiting for the presence of a specific element that indica...read more
Q2. Write a program to reverse string in java?
Program to reverse a string in Java using StringBuilder
Create a StringBuilder object with the input string
Use the reverse() method of StringBuilder to reverse the string
Convert the reversed StringBuilder object back to a string using toString()
Q3. Explain your automation framework?
My automation framework is a data-driven framework using Selenium WebDriver and TestNG for test execution and reporting.
Data-driven approach for test case design
Integration with Selenium WebDriver for browser automation
Utilization of TestNG for test execution and reporting
Modular design for easy maintenance and scalability
Q4. How to handle pop ups.
Pop ups can be handled in automation testing by using various methods such as handling alerts, using window handles, or using specific commands in the automation tool.
Use alert interface to handle JavaScript alerts
Use switchTo().window() method to handle multiple windows
Use specific commands in automation tool like acceptAlert() or dismissAlert()
Q5. What is polymorphisum
Polymorphism is the ability of a single function or method to operate on different types of data.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
There are two types of polymorphism: compile-time (method overloading) and runtime (method overriding).
Example of compile-time polymorphism: function overloading where multiple functions have the same name but different parameters.
Example of runtime polymorphism: method overriding wher...read more
Q6. Annotations in TestNG framework.
Annotations in TestNG framework are used to provide additional information about test methods and classes.
Annotations are used to define the behavior of test methods, such as @Test, @BeforeMethod, @AfterMethod, etc.
Annotations help in organizing and prioritizing test methods, setting up preconditions, and cleaning up after tests.
Annotations can be used to group test methods together using @Test(groups = "smoke") for example.
Annotations can also be used for parameterization, d...read more
Q7. What is constructor
A constructor is a special type of method that is automatically called when an object is created.
Constructors have the same name as the class they belong to
Constructors do not have a return type
Constructors can be used to initialize object properties
Q8. Methods in string class
Methods in string class include substring, indexOf, length, toUpperCase, toLowerCase, trim, etc.
substring() - returns a new string that is a substring of the original string
indexOf() - returns the index within the string of the first occurrence of the specified value
length - returns the length of the string
toUpperCase() - converts the string to uppercase
toLowerCase() - converts the string to lowercase
trim() - removes whitespace from both ends of the string
Q9. Types of locators
Locators are used in automation testing to identify web elements on a page. Common types include 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 HTML document
CSS selector: Selector based on CSS attributes
More about working at Bajaj Finserv
Interview Process at BOKEH ads
Top Automation Test Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month