How to handle SSL certificate in Edge browser for Selenium Web-Driver?

In many cases we can face the error related to SSL certificate as mentioned below :- So, this error in Edge browser can be handled using EdgeOptions class provided by Selenium Web driver. The sample code block is mentioned below:- In the above code block we are accepting the Insecure certificate by passing Boolean value…

Any other way we can enter the input data in a text Box other than using sendKeys() methods in Selenium WebDriver?

Ans:- This is very frequently asked by the interviewer to check whether you are aware about the JavaScriptExecutor interface or not. Using javaScriptExecutor we can enter the input data in a text box. The code is mentioned below:- Code:- Explanation of the source code (Here source code snip added for better understanding):- JavaScriptExecutor is an…

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

What are WebElements in a web page?

It’s most important concept in the context of Selenium WebDriver. Selenium WebDriver interacts with the webpages with the help these WebElements. Now the question is what actually it is? Actually each webpage contains lots of elements like textboxes, dropdowns, buttons etc. These are called the webElements. Suppose take the example of the main search page…

What is Data Driven Testing Techniques in Selenium?

Data-driven testing is one of the popular testing approach. Why this approach is so popular and useful? Take a real life example. Just write the test cases to test the “Username” field for the rediffmail pages. The possible test-cases at gross level are:- Test Case ID Test Case Subject Test Case Description Test Steps Prerequisites…