Iterator is a method which returns an iterator over elements. It is defined inside the “Iterable” interface of java collection framework. The source code of this interface can be found in the below mentioned link. Let’s create on collection of hotels as mentioned in the below mentioned code:- The source code of the “Hotel” class…
Category: Selenium Interview Questions and Answers
Which is the right time to execute the automation test scripts and what is the time interval you run those test scripts ?
Automation test script obviously need to execute when the application becomes stable only. So, at the initial phase of the development lifecycle better use the manual testing and unit testing block to ensure the stability of the system. And in the later part of the software development life cycle, when the system becomes comparatively stable…
How will you segregate (on what basis) the regression , sanity , smoke suite if there are more than 400 manual test cases are present?
Before segregation of testcases, one must have clear idea about the different testing methods. So please refer the link for that. So, obviously, the smoke testing suite will contain the high priority and high severity testcases. So and if time permits, include severity 2 level as well. So, the set of testcases with high severity…
What is Smoke testing, Sanity Testing and Regression Testing?
Smoke Testing:- It’s done at the early phase of software development life cycle to ensure that core functionalities are working fine. The main purpose to identify the blocker or any major issues at the very early stages to save the efforts and time of the delivery life cycle. Sanity Testing:- It’s performed when a new…
How to launch the chrome browser and open the target url using Selenium?
So for that at first we have to set the system property “webdriver.chrome.driver” and need to provide the path of the executable file of the chrome driver. The code block is mentioned below:- Now we can set the options of the chrome driver. This step is optional. Here we can set the execution mode of…
How to handle the Dynamic Google suggestions using Selenium
Many times we have to handle the suggestions in the search box dynamically. As shown below for the google search page. When typed “selenium” word, it’s showing so many suggestions:- Now if we want to select only “selenium interview questions” then how to do that? As these options appears dynamically, so by using fixed locator…
First and very easy sample Selenium WebDriver Script
In the below mentioned script the following user actions are performed:- User opens the browser. User enter the URL of google home page and lands on the Google home Page. User clicks on the search box and provided input text “Selenium Test”. User waits for 4000 mill seconds. User clicks on the Search button. Now…
findElement method in Selenium WebDriver
To find any web element in any webpage this findElement method is used by Selenium WebDriver. This is an abstract method and defined under the SearchContext interface. as mentioned in the source code. But this SeachContext interface is also implemented by the SeleniumWebDriver interface as mentioned in here. As mentioned in the source code comment…
Selenium WebDriver is a class or interface?
The best way to answer this question is to check the source code of Selenium WebDriver. The source code can be found here. In that source code it is clearly mentioned that, the Selenium WebDriver is an interface. The clear and concise source code of selenium WebDriver interface is mentioned below:- import org.openqa.selenium.logging.LoggingPreferences; import org.openqa.selenium.logging.Logs;…
Web Element in Selenium is a class or interface?
To answer this question, we have to take a look at the source code of Selenium WebDriver. The source code can be found here. In that source code, it’s clearly mentioned that WebElement is an interface. The clear and concise code of WebElement interface is mentioned below. So, as mentioned above, the WebElement interface has…