Selenium WebDriver Tutorial #11 - Understand WebDriver Interface

preview_player
Показать описание
In this Selenium Webdriver Tutorial we will understand about WebDriver Interface and how to read Selenium WebDriver Javadoc.

We will understand the reason behind the commands:

WebDriver driver = new ChromeDriver();
OR
WebDriver driver = new FirefoxDriver();
or any other browser objects.

Help me in spreading the knowledge, please hit LIKE, SHARE and SUBSCRIBE for latest tutorials.

More tutorial playlists below:

❖ TRAININGS ON RCV ACADEMY PORTAL ❖

❖ FOLLOW US ON TWITTER ❖

❖ LIKE US ON FACEBOOK ❖

❖ OUR TUTORIAL WEBSITES ❖

❖ GET MY TRAININGS ON UDEMY ❖
#SeleniumTutorial #SeleniumTraining #TestAutomation #SeleniumWebDriverTutorial #SeleniumWebDriver #SoftwareTesting #RcvAcademy #SoftwareTestingMentor
Рекомендации по теме
Комментарии
Автор

Very effective and clear explanation of concepts. I have taken few automation testing courses before but these basic concepts are usually missed and it makes a lot of difference. You are a very good mentor and have great communication skills.

rizishere
Автор

A very effective mentor! I really appreciate your teaching method.

mohammadzonaid
Автор

Your are teaching the way awesome... Easy learning

harishkakumani
Автор

awesome, i learnt new things here as i am new to selenium webdriver.

deepabista
Автор

this course is amazing, the best of the best, i know that the world of software testing is very broad but i aspire with this course to have a good foundation. I come from programing in C# is not very different from java so i think i'm fine for that part.

andergarcia
Автор

Fantastic, Everything u teach in deeply thank u so much

TECHJIR-xy
Автор

sir what about ending brace of login test.The way of teaching of you is awesome no words....love you somuch.

lokeshmacharla
Автор

Thank you so much for this wonderful series

yugbarai
Автор

I'm not getting nullpointer exception when I don't use WebDriver interface in my code window and code runs smooth.
But WebDriver interface is required for implementations of this interface directly.

aparajitaj
Автор

Selenium WebDriver Tutorial - Notes

1. WebDriver Interface in Selenium:
- Selenium WebDriver allows interaction with browsers to perform actions like clicking elements and typing in input boxes.
- To create an object of a class in Java, use the "new" keyword with the class name (e.g., "new ChromeDriver()").
- ChromeDriver is a WebDriver implementation for controlling a local Chrome browser.

2. WebDriver Interface and Implementing Classes:
- WebDriver is an interface, while ChromeDriver, FirefoxDriver, EdgeDriver, etc., are classes that implement it.
- Each browser driver is an implementing class of the WebDriver interface.
- The reason for using the WebDriver interface is to execute the same code on multiple browsers without duplicating it.

3. Handling Multiple Browsers with WebDriver Interface:
- To execute code on different browsers, use external configurations (e.g., CSV, Excel) to store browser details.
- Read the browser configuration from the external file and choose the appropriate driver class accordingly.
- By using the WebDriver interface, you can create an object of the specific browser driver based on the configuration.

4. Leveraging JavaDoc:
- The JavaDoc provides documentation for Selenium WebDriver, interfaces, and classes.
- Interfaces, like WebDriver, cannot be instantiated directly, but implementing classes like ChromeDriver can.
- The WebDriver interface defines methods like getTitle(), getCurrentUrl(), etc., while implementing classes provide additional functionalities.

5. Best Practices:
- Use the WebDriver interface to create an object of the browser driver to facilitate switching between browsers.
- By taking the reference of the WebDriver interface, you can use the same code for different browsers.
- Utilize external configuration files to store browser details and execute test cases on multiple browsers seamlessly.

manoj_mafiosi
Автор

Hello, Can you please help me?
I am not able to run the code in chrome and edge, it is running fine in Firefox though.

vanikaagarwal
Автор

Hello, thank you for your help, i've got juste a question regarding browsers, how can i do if i want to execut Two browsers or more in the same script demonstrated in your video

Many thank's for help

omarmalek
Автор

First video in this series where I just didn't follow things. Almost certainly because I don't know Java which you mentioned. I wonder if it would have actually been better to skip use of WebDriver at this point and then revisit later and go into some Java fundamentals at the same time? Or just cover it off in Java tutorials you mentioned. As it is, I don't think many folks that don't know Java and/or Object Oriented Programming are going to be able to follow this. So might have been better to 'hardcode' a couple of browsers with the caveat that the viewer should also check out your Java and/or WebDriver videos separately.

To be clear at the 16:30 mark onwards I do follow the solution, but I don't fully understand the interfaces vs classes etc.

GrumpyStoic
Автор

Thank you for help me to run testcase can you please create one session for parallel test case execution on maven dependency management

akshaybhad
Автор

driver.get (url); is not working, it is just opening the browser not he url..? When i searched online it is saying it is a selenium defect, but this problem is occuring only after applying if else logic..? Any solution ?

pumce
Автор

how can i make an array of chrome driver for handling multiple instances?

aniketbose
Автор

When you will publish POM and Hybrid framework tutorials

hemangishelake
Автор

Can someone please send link where we can read file from excel sheet for browser and can open browser accordingly

karankhanna
Автор

not multiple tabs. multiple instances. if i have more than one user in Chrome(not in whole p.c) only in chrome if i have hundred users then i need to write driver1 driver2 i downt want to do that i want to make an array.

aniketbose
Автор

i need help in verification of email after signup

manaliagrawal