What is the difference between driver.get() and driver.navigate().to() in Selenium WebDriver?

  Рет қаралды 14,931

H Y R Tutorials

H Y R Tutorials

Күн бұрын

In this video, I have explained about "What is the difference between driver.get() and driver.navigate().to() in Selenium WebDriver?".
Video Timeline:
00:00 Introduction
01:46 Google answers
03:45 Myths or Facts?
04:56 Code in WebDriver APIs
13:18 Interview Question & Answer
The first thing you will want to do after launching a browser is to open your website.
Sometimes in the middle of the execution as well, we want to navigate to another URL.
so it's very important to know how we can achieve this in selenium webdriver.
Selenium webdriver is providing two methods to achieve this operation, those are:
👉 get
👉 to
Out of these two methods, one method i.e get is directly accessible from the driver instance because it is part of webdriver interface.
And the other method i.e to is available on the navigation interface.
The navigation interface is being implemented by RemoteNavigation class in selenium webdriver.
Which is again a subclass of RemoteWebDriver class.
As you all knew, RemoteWebDriver class implements WebDriver, JavascriptExecutor, Takescreenshot and many other interfaces.
All the browser-related classes like ChromeDriver, ChromiumDriver, FirefoxDriver, InernetExplorerDriver, OperaDriver, and SafariDriver are extending the RemoteWebDriver class.
Hence the implemented code for get and to methods is available under RemoteWebDriver class.
In this video, I have shown the differences between get and to methods.
And also exposed the myths and facts about this question.
Along with these things I have also provided the interview answer.
==============================================
↔️ Selenium Interview Questions Playlist Link: bit.ly/3matUB3
✴ Checkout my other playlists: bit.ly/3gLIAVL
☕ Buy me a coffee: bit.ly/33ljBWc
👑 Join my KZfaq channel to get access to perks:👇
/ @hyrtutorials
==============================================
==============================================
Connect us @
🔗 Website - www.hyrtutorials.com
🔗 Telegram - t.me/hyrtutorials
🔗 Facebook - / hyrtutorials
🔗 LinkedIn - / hyrtutorials
🔗 Twitter - / hyrtutorials
🔗 Instagram - / hyrtutorials
==============================================
==============================================
🙏 Please Subscribe🔔 to start learning for FREE now, Also help your friends in learning the best by suggesting this channel.
#hyrtutorials #selenium #interviewQuestions #webAutomation
Selenium Interview Questions By Yadagiri Reddy
h y r tutorials hyr tutorials selenium interview questions and answers selenium tutorial for beginners selenium java selenium interview questions and answers selenium tutorial for beginners selenium java
selenium selenium java selenium tutorial for beginners automation testing selenium webdriver, Selenium With Yadagiri Reddy

Пікірлер: 76
@HYRTutorials
@HYRTutorials 3 жыл бұрын
📌 Selenium Interview Questions Playlist Link: bit.ly/3matUB3 ✴ Checkout my other playlists: bit.ly/3gLIAVL ☕ Buy me a coffee: bit.ly/33ljBWc
@navathutejomai1038
@navathutejomai1038 2 жыл бұрын
I always used to follow what I have read, but today I saw you who makes his own validation and follow, you are a gem of person Sir
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Thankyou buddy
@priyadarshiniMG
@priyadarshiniMG Ай бұрын
Wonderful explanation👌👌👏👏thank you so much👍👍
@nagasaimaddula56
@nagasaimaddula56 3 ай бұрын
Very useful information bro. Got full clarity.
@SinghAmitKumar-bf9nr
@SinghAmitKumar-bf9nr Жыл бұрын
Great Explanation I must Say... Most of the people gave wrong answers as most the places it is written wrong, If they have not seen your Explanation. Thanks for sharing the video. Great Thanks
@HYRTutorials
@HYRTutorials Жыл бұрын
That's why I have shown in the code also buddy So that while answering in the interview, you can be very confident
@prasannamahale1854
@prasannamahale1854 3 жыл бұрын
Really worth watching each and every video Very useful...🙏
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Thanks a lot
@wilmergonzales2139
@wilmergonzales2139 3 жыл бұрын
Excelente aporte. Gracias
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Encantado de que te haya gustado
@jyothireddykonduru
@jyothireddykonduru 2 жыл бұрын
Very unique explanation difference. GREAT MIND!! HYR :)
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Thankyou 😊
@tapaskhandai
@tapaskhandai Жыл бұрын
Wow Man. Please create more and more videos. Will follow every video of yours. Thank You so much.
@HYRTutorials
@HYRTutorials Жыл бұрын
Thanks buddy 😊
@prasadpatil289
@prasadpatil289 2 жыл бұрын
Thanks for providing such a deep insight
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Glad it was helpful!
@srilekha009
@srilekha009 2 жыл бұрын
Thank you so much for providing this information sir🙏
@HYRTutorials
@HYRTutorials 2 жыл бұрын
It's my pleasure buddy
@Johnny-pt5jb
@Johnny-pt5jb 3 жыл бұрын
The best and simplest explanation I have seen so far. Is this also a myth? "Single-Page Applications are an exception to this. The difference between these two methods comes not from their behavior, but from the behavior in the way the application works and how the browser deals with it. navigate().to() navigates to the page by changing the URL like doing forward/backward navigation. Whereas, get() refreshes the page to change the URL."
@HYRTutorials
@HYRTutorials 3 жыл бұрын
As you said it is a myth only. In the video I have shown at the code level also ryt. There is no difference between both of these methods in the functionality.
@mithunbiswas5307
@mithunbiswas5307 2 жыл бұрын
Great useful videos!! thanks
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Glad it was helpful!
@shivu2012
@shivu2012 Жыл бұрын
Awesome man!
@HYRTutorials
@HYRTutorials Жыл бұрын
Thanks buddy
@GrafMKristo
@GrafMKristo 2 жыл бұрын
I feel like I've just watched some cool detective movie with suspense and release! =)) You're a real pro!
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Haha thankyou buddy
@jawwad4020
@jawwad4020 Жыл бұрын
Thanks for sharing your wisdom sir! Now I know not to trust random internet sources ❤️
@HYRTutorials
@HYRTutorials Жыл бұрын
Thanks buddy 😊 Unless we see the proof, we shouldn't believe the internet stuff buddy
@NeverStopLearning56
@NeverStopLearning56 Жыл бұрын
Please make a Vedio explaining the architecture of Selenium 3 & selenium 4 practically, this is mostly asked question across everywhere
@HYRTutorials
@HYRTutorials Жыл бұрын
Sure buddy
@juhisehgal6455
@juhisehgal6455 2 жыл бұрын
Bro you are killing it😎
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Thankyou buddy 😊
@mohanramakrishnakonijety9405
@mohanramakrishnakonijety9405 19 күн бұрын
Thank you
@surabhikaur4274
@surabhikaur4274 2 жыл бұрын
Nice explanation. Please prepare more videos on selenium interview questions.
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Thankyou buddy
@ParaDox-uv6hu
@ParaDox-uv6hu 11 ай бұрын
Thank you sir
@HYRTutorials
@HYRTutorials 10 ай бұрын
Happy learning buddy 😊
@yaswanthtirupathi6551
@yaswanthtirupathi6551 Жыл бұрын
Thank you so much bro😊,.Please make some more videos on interview questions bro🙏🙏,.this will be very helpful to many people👏
@HYRTutorials
@HYRTutorials Жыл бұрын
Sure buddy
@navathutejomai1038
@navathutejomai1038 2 жыл бұрын
Can you continue this series it is very helpful
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Yeah i have to continue. planned some more videos like this but not getting enough time to make them
@madhurikandulabn8869
@madhurikandulabn8869 2 жыл бұрын
Such a great job
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Thankyou buddy 😊
@SinghAmitKumar-bf9nr
@SinghAmitKumar-bf9nr Жыл бұрын
I will surely follow you.. :)
@HYRTutorials
@HYRTutorials Жыл бұрын
Thanks buddy 😊
@crazycuber1107
@crazycuber1107 2 жыл бұрын
Really smart
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Thankyou buddy 😊
@meghanajugunta7948
@meghanajugunta7948 Жыл бұрын
ur the best...lob lob
@HYRTutorials
@HYRTutorials Жыл бұрын
Thanks buddy 😊
@beastfans_india
@beastfans_india 8 ай бұрын
I watch this video and tried myself u were right..yesterday i got this question in interview...I told no difference only it will accept string and url to my interviewer this misconceptions fast and all not there and she opened a chrome browser and showed a website ..."see here which one is fast " ...😂 I ask her to check implemention she said ok i will accept and said why they gave navigate seperately then simply ? I was blank 😁 ....what would i have said at time any suggestions from you...
@NeverStopLearning56
@NeverStopLearning56 Жыл бұрын
Hello sir, Correct me if i am wrong , Here, When you are referring to stack overflow website and Tutorials point website, We can see they have given the differences between driver.get() and driver.navigate() And not driver.get() and driver.navigate.to() Please check once....
@HYRTutorials
@HYRTutorials Жыл бұрын
There is no driver.navigate method directly in selenium buddy. We tend to say it like driver.get and driver.navigate . It's like asking how you doing instead of how are you doing.
@gurumurthy757
@gurumurthy757 3 жыл бұрын
Is driver .get and navigate is example of override?
@HYRTutorials
@HYRTutorials 3 жыл бұрын
No it is not a concept of overriding. But you can consider it as reusability of code.
@shreyanshsingh2782
@shreyanshsingh2782 2 жыл бұрын
sir how to give url instance as parameter please tell example?
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Create the URL instance buddy. URL is one class in java. And pass that to this method
@chayae3740
@chayae3740 Ай бұрын
Are you providing online classes?
@roshanp.thomas1768
@roshanp.thomas1768 2 жыл бұрын
Hi what is difference between an attribute and property in webelement..can you please tell with example.
@HYRTutorials
@HYRTutorials 2 жыл бұрын
There is no difference actually. It's just the way how we call it. Some say webelement properties and some say attributes.
@roshanp.thomas1768
@roshanp.thomas1768 2 жыл бұрын
@@HYRTutorials Ok.once the web elements are parsed then attributes is considered as properties..is it so...
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Yeah kind of u can say. In HTML terminology, we call them attributes. In programming language, everything is an object and an object will have the properties right. So once we find the element in our program, we refer them as properties because the entire element becomes our object.
@Shubham-fk4is
@Shubham-fk4is 2 жыл бұрын
Can you please tell me, How can I prepare for the interview if the internet shows myths as answers? Please Reply?
@HYRTutorials
@HYRTutorials 2 жыл бұрын
By learning the subject thoroughly buddy. Don't just go by the internet answers. Verify that in your code and understand how is it working and all.
@Shubham-fk4is
@Shubham-fk4is 2 жыл бұрын
@@HYRTutorials Ok Thanks
@itspratik
@itspratik 2 жыл бұрын
when i click f3 its showing source not found
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Are you using normal java project?
@itspratik
@itspratik 2 жыл бұрын
@@HYRTutorials yes
@shaikshashaikshaiksha4441
@shaikshashaikshaiksha4441 2 жыл бұрын
Topic is clear but go slow then it will be understand easily
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Thankyou buddy 😊 I will try to go slow
@chayae3740
@chayae3740 3 жыл бұрын
What is cookies
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Cookie is kind of a datatype which store some information like personal information or session id or authentication key etc.. in browser.
@chayae3740
@chayae3740 3 жыл бұрын
@@HYRTutorials tqu sir
@HYRTutorials
@HYRTutorials 3 жыл бұрын
@@chayae3740 welcome
@sainathvallampatla5135
@sainathvallampatla5135 3 жыл бұрын
Thank you
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Glad to hear
How to handle Permission Pop-ups using Selenium WebDriver | Selenium |
29:05
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 10 МЛН
Red❤️+Green💚=
00:38
ISSEI / いっせい
Рет қаралды 89 МЛН
Каха заблудился в горах
00:57
К-Media
Рет қаралды 10 МЛН
Useful gadget for styling hair 🤩💖 #gadgets #hairstyle
00:20
FLIP FLOP Hacks
Рет қаралды 10 МЛН
What is JUnit? | Why Mockito?
14:38
Telusko
Рет қаралды 367 М.
Selenium Webdriver Hierarchy In Interview | Automation Interview
17:26
Two Methods For Compass Navigating Around Objects
42:11
ReallyBigMonkey1
Рет қаралды 38 М.
What is HTML DOM & StaleElement Exception in Selenium
36:04
Naveen AutomationLabs
Рет қаралды 81 М.
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 10 МЛН