How to access collection elements in java using iterator method?

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…

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 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…

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;…