Automation Testing Interview For Experienced| Mphasis Interview Questions

0 Views
Published
Throw Vs. throws

Explain the priorities of the Locators you applied in your project. How do you decide?


What does New do While object creation?
The Java new keyword is used to create an instance of the class. In other words, it instantiates a class by allocating memory for a new object and returning a reference to that memory.

Given string test234, extract the only number, write a logic?



How do you handle an element not visible exception?
First Solution: Try to write unique XPATH that matches with a single element only. Second Solution: Use Explicit wait feature of Selenium and wait till the element is not visible. Once it is visible then you can perform your operations


Why is PageFactory used?
The PageFactory can be used to initialize elements of a Page class without having to use FindElement or FindElements. When you are using the webelement(s) more then once your code gets better readable.



How to switch over the elements in iframes using Web Driver commands:
Basically, we can switch over the elements and handle frames in Selenium using 3 ways.

By Index
By Name or Id
By Web Element



How to handle nested iframes in Selenium WebDriver?
Print the number of frames with Selenium WebDriver inside this web page. ...
Switch to the parent frame using the id of the frame.
Print the number of frames using Selenium WebDriver inside the parent frame.




How do I switch my child to a parent window?
In order to switch its focus from the parent to the child window, we shall take the help of the switchTo(). window method and pass the window handle id of the child window as an argument to the method. Then to move from the child window to the parent window, we shall take the help of the switchTo().


How to close child browser window in Selenium WebDriver using Java?


Clear browser Cookies with Selenium WebDriver Java bindings.
We can clear browser cookies in Selenium. The method deleteCookieNamed shall delete a cookie with a specific name. The cookie named is passed as an argument to the method. First, we will add a cookie, then get it and finally delete it.

Syntax
driver.manage().deleteCookieNamed("foo");
Another method called the deleteAllCookies deletes all cookies from the existing domain. First, we will add the cookies, then get and delete them.

Syntax
driver.manage().deleteAllCookies();


what is build tool Maven
Maven is a build automation tool used primarily for Java projects. Maven can also be used to build and manage projects written in C#, Ruby, Scala, and other languages. The Maven project is hosted by the Apache Software Foundation, where it was formerly part of the Jakarta Project.




There are @Test1 and @Test2 methods in TestNG, but there are methods in Test1 which get executed only if Test2 gets executed. So how to approach?
How to rerun failed TestCases?
Explain how do you approach the Testing process if you are on day 1 of the sprint?
Explain which priority Test Suites you run in Automation,i.e., do you run all P1, P2, P3 suites in all the sprints every day?
Explain the priorities of the Locators you applied in your project. How do you decide?
Explain Regression Testing w.r.t Manual and Automation testing, what is the Approach?
Category
Job
Be the first to comment