Why do we need to typecast the WebDriver Instance to use TakeScreenshot or JavascriptExecutor?

  Рет қаралды 28,562

H Y R Tutorials

H Y R Tutorials

Күн бұрын

Пікірлер: 121
@HYRTutorials
@HYRTutorials 4 жыл бұрын
📌 Selenium Interview Questions Playlist Link: bit.ly/3matUB3 ✴ Checkout my other playlists: bit.ly/3gLIAVL ☕ Buy me a coffee: bit.ly/33ljBWc
@sirisha234
@sirisha234 3 жыл бұрын
Just wow. What a nice way of explanation. That particular diagram is a million dollar worth.
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Thankyou 😊 Diagram makes the topic easy and more understandable.
@rahulsony2272
@rahulsony2272 6 күн бұрын
Best explanation received so far .. Thanks Buddy
@ferdanondrej
@ferdanondrej Жыл бұрын
Great explanation of all important topics related to instantiation of WebDriver and typecasting I could find in one video, thank you!
@HYRTutorials
@HYRTutorials Жыл бұрын
Thanks buddy 😊
@gpavankumar175
@gpavankumar175 3 жыл бұрын
Superb explaination. I was wondering why we are typecasting and what is it. Thanks, now clear.
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Super 😊
@anichavan11
@anichavan11 3 жыл бұрын
Very good explanation and after watching full video came to know the main reason for typecasting. Please make more videos like this. 👍
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Thank you, I will
@AnkitSingh-be4wi
@AnkitSingh-be4wi 4 жыл бұрын
Nice explaination using interface and inheritance all together 👍 Watched twice to recollect everything together..
@HYRTutorials
@HYRTutorials 4 жыл бұрын
Thank you 😊
@SongsSaregama
@SongsSaregama 2 жыл бұрын
one of the very good video and topic on the internet and the explanation way is very simple and good. this was one of the question in my mind from a long time, today i thought lets check on youtube and i found you. Thanks you sir for explaning this in very excellet way . Thanks a lot.
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Thankyou buddy 😊
@swayamkarnjkar6516
@swayamkarnjkar6516 3 жыл бұрын
One of the very best explanation, I have ever came across you are awesome. you should make more videos on interview questions
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Thank you, I will
@chithrarajeswaran730
@chithrarajeswaran730 Жыл бұрын
perfect explanation.. very easy to understand.. thanks much bro
@HYRTutorials
@HYRTutorials Жыл бұрын
Thanks buddy 😊
@rupalibhagat1989
@rupalibhagat1989 Жыл бұрын
Excellent way of teaching......
@HYRTutorials
@HYRTutorials Жыл бұрын
Thanks buddy 😊
@adityakavathale58
@adityakavathale58 Жыл бұрын
Thanks for the explanation sir. That diagram helps a lot.
@HYRTutorials
@HYRTutorials Жыл бұрын
Happy learning buddy 😊
@umadevi-yo3yl
@umadevi-yo3yl 3 жыл бұрын
Well explained 🙏🙏non technical people also can understand easily thank you so much 👏👏
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Thankyou 😊
@Suukhhh
@Suukhhh 2 жыл бұрын
You are brilliant... Really Really Helpfull... Thank you sir
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Thanks buddy 😊
@veganforlife4699
@veganforlife4699 11 ай бұрын
Best explanation, thanks mate. Gratitude 🙏🙏🙏
@pasha9327
@pasha9327 4 жыл бұрын
Great Explanation.thank you so much.
@HYRTutorials
@HYRTutorials 4 жыл бұрын
Glad you liked it
@hiteshdarji9925
@hiteshdarji9925 2 жыл бұрын
Nice. Very good explanation.
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Thankyou 😊
@guruishu7766
@guruishu7766 4 жыл бұрын
Perfect explanation as usual
@HYRTutorials
@HYRTutorials 4 жыл бұрын
Thank you 😊 Stay tuned for more videos like this
@Bala786A
@Bala786A 3 жыл бұрын
Good explained..... Thank you 👍
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Glad it was helpful!
@paresh-ranaut
@paresh-ranaut 2 жыл бұрын
Great explanation, Thank you very much!
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Thanks buddy 😊
@jagsautomation2759
@jagsautomation2759 Жыл бұрын
Excellent explanation.
@PradipYogi59
@PradipYogi59 3 жыл бұрын
Very good explanation
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Thanks for liking
@zeeshanahmed9943
@zeeshanahmed9943 3 жыл бұрын
Very good explanation...you are awesome...:)
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Thanks a lot 😊
@C.Sakthivignesh
@C.Sakthivignesh Жыл бұрын
Thanks sir for made this video.
@HYRTutorials
@HYRTutorials Жыл бұрын
Happy learning buddy 😊
@chinnikrishnad6736
@chinnikrishnad6736 8 ай бұрын
Wonderful HYR garu. Then, can we directly do as following? RemoteWebDriver driver=new RemoteWebDriver(); and use it? Kindly reply. And, as always, Thanks for your great teaching.
@harinihar2468
@harinihar2468 3 жыл бұрын
Neat explanation 👌👏..thank you subscribed 👍
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Thankyou 😊
@owel09
@owel09 3 жыл бұрын
thank you. You explain it very well
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Thankyou 😊
@hemangishelake4379
@hemangishelake4379 4 жыл бұрын
Wow😍. What a explanation. Could you please make more videos on interview questions
@HYRTutorials
@HYRTutorials 4 жыл бұрын
Thankyou, Sure 😊
@akshaysagare5378
@akshaysagare5378 4 жыл бұрын
Very nice explaination
@HYRTutorials
@HYRTutorials 4 жыл бұрын
Thank you 😊 Keep watching
@sathishvijay3476
@sathishvijay3476 2 жыл бұрын
Very clear explanation
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Thanks buddy 😊
@parvinkouliev11
@parvinkouliev11 3 жыл бұрын
Excellent explanation. Can you also explain why don't we just use RemoteWebDriver class to create driver instance in this case which would not need typecasting since RemoteWebDriver inherits all methods of all 3 interfaces.
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Yes we can use remotewebbriver class as well. There is nothing wrong in using it but the only reason we usually use the webdriver is because of its name. Remotewebbriver is more often used for remote execution where you mention the ip address and port number. So for all local executions we use webdriver. It's just a standard we usually follow but if we want to maintain the uniformity then we can always use the remotewebbriver class.
@youshouldknow9369
@youshouldknow9369 2 жыл бұрын
Till Selenium v3, ChromeDriver extends RemoteDriver. This ChromeDriver was a WebDriver implementation that controlled the google-chrome browser running on the local machine.
@manikandankm3974
@manikandankm3974 2 жыл бұрын
@@HYRTutorials Hello Sir , I have a doubt here , Even we use Webdriver instance here , Remotewebdriver Inherits its properties and Again All the browser class INHERITS the properties of Remowebdriver ( Chromedriver Extends RemoteWebdriver) , In this case we don't requires typecasting right , The browser classes have all the method implementation of JS Interface and driver automatically takes the Methods of JS ?? Please clarify.
@GowthamiNaraparaju-h6s
@GowthamiNaraparaju-h6s Жыл бұрын
simply super bro
@HYRTutorials
@HYRTutorials Жыл бұрын
Thanks buddy 😊
@pramothcr1503
@pramothcr1503 Жыл бұрын
wow simply awesome !
@HYRTutorials
@HYRTutorials Жыл бұрын
Thanks buddy 😊
@yuvasrivanth
@yuvasrivanth 3 жыл бұрын
Excellent one 🙏
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Thankyou 😊
@arreddypala5058
@arreddypala5058 2 жыл бұрын
Super explanation
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Thankyou buddy 😊
@ksdnsdkumar1375
@ksdnsdkumar1375 2 жыл бұрын
You didn't mention "RemoteWebDriver" anywhere, then why did you include in the diagram?
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Remotewebdriver is the class where all the interferences are implemented buddy
@RAHULKUMAR-rb6pl
@RAHULKUMAR-rb6pl 7 ай бұрын
Sir whenever we said typecasting for javascriptExecutor in that situation to be more precise we can say it is also upcasting or not
@yaswanthtirupathi6551
@yaswanthtirupathi6551 2 жыл бұрын
Thank you so much bro
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Happy learning buddy
@madhukrishna5704
@madhukrishna5704 Жыл бұрын
As per the typecasting rule: The object(TakesScreenshot) type should be same or parent of runtime object of driver,i.e(Cromedriver). 1)It works when both are related to class. 2)But i don't know when they are interfaces and classes.(TakesScreenshot is a interface and Chromedriver is a class). Is same typecasting rule applied to above statements? If not could pls clarify my doubt?
@sujitblues
@sujitblues 7 ай бұрын
please create java interview series (coding & conceptual ) both
@mjj3tube
@mjj3tube 2 жыл бұрын
When we say Takescreenshot ts = (Takescreenshot ) driver , is this up casting or down casting ?
@HYRTutorials
@HYRTutorials 2 жыл бұрын
you could say upcasting only but we shouldn't use the down casting or upcasting words here instead we should simply call it as typecasting.
@mjj3tube
@mjj3tube 2 жыл бұрын
@@HYRTutorials got it thanks for the kind response
@ManiKandan-vo2qr
@ManiKandan-vo2qr 4 жыл бұрын
Hello Sir , JavaScript Executor is also an interface right? So Even though we type cast into JavaScript executor , How can we access the method executescript() which is un-Implemented still in interface ? Please tell me
@HYRTutorials
@HYRTutorials 4 жыл бұрын
Basically here we alrdy have the fully implemented driver but when u r creating the driver instance type as webdriver then you can only access methods inside the webdriver interface even though it has the JavaScriptExecutor methods code. So that is why we are typecasting it to JavaScriptExecutor.
@Drake9w1
@Drake9w1 3 жыл бұрын
@@HYRTutorials Hello Sir. I had the same question and I did not understand this answer. Could you please simplify.
@HYRTutorials
@HYRTutorials 3 жыл бұрын
@@Drake9w1 to understand this, have some basic understanding of interfaces and classes. It's very easy once you got some basic idea about those.
@swapnabhaskaruni
@swapnabhaskaruni 2 жыл бұрын
@@HYRTutorials so do you mean because we write a statement WebDriver driver = new ChromeDriver() and the ChromeDriver class has all the methods implemented from WebDriver, JavaScriptExecutor and TakesScreenshot we are able to typecast the driver and access other interface class methods. But if we write WebDriver driver = new WebDriver() then the typecast would not work. Please correct me.
@HYRTutorials
@HYRTutorials 2 жыл бұрын
@@swapnabhaskaruni first of all you can't create an object for webdriver. Check your second statement one more time
@swapnabhaskaruni
@swapnabhaskaruni 2 жыл бұрын
Looks like there are more selenium tutorials in english playlist than the selenium telugu playlist. If there are any missed topics in telugu playlist can you do them in telugu too. Its just easy to process in telugu. and i feel because our mother tongue is telugu explanation and understanding is easier and faster in telugu. Please consider my request.
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Some of the additional topics are covered in English and the interview questions are also created in English only. I will create them in telugu language but it may take some time
@harisake6068
@harisake6068 11 ай бұрын
Thank you
@MyGreatAchievers
@MyGreatAchievers Жыл бұрын
when there is no relashion between webdriver and takescreenshort references then how can we typecasting it? please explain.
@kumarshubham5537
@kumarshubham5537 4 ай бұрын
Can you please tell me how to say these answers precisely in interview as we won't have any script over there.
@subhashinic7000
@subhashinic7000 Жыл бұрын
Why are we not typecasting it when we use ChromeDriver driver; ?
@HYRTutorials
@HYRTutorials Жыл бұрын
Because typecasting is not required buddy
@adityatripathi3379
@adityatripathi3379 2 жыл бұрын
Why we don't write RemoteWebDriver driver = new ChromeDriver(); ?
@HYRTutorials
@HYRTutorials 2 жыл бұрын
We can write and there is nothing wrong in that. It's just that by name we can see. Remotewebdriver is mostly used for remote connections.
@rishabhmehta9498
@rishabhmehta9498 Жыл бұрын
Thankyou
@HYRTutorials
@HYRTutorials Жыл бұрын
Happy learning buddy 😊
@babupemmada1580
@babupemmada1580 2 жыл бұрын
What is unimplemented methods sir?
@HYRTutorials
@HYRTutorials 2 жыл бұрын
In java we have the concept of abstract methods and non abstract methods. Abstract methods are also called as unimplemented methods. These methods are present in either interface it abstract class.
@abinashprakash804
@abinashprakash804 2 жыл бұрын
awesome
@HYRTutorials
@HYRTutorials 2 жыл бұрын
Thankyou buddy 😊
@mycreativelife2837
@mycreativelife2837 Жыл бұрын
👏👏👏👏👏
@HYRTutorials
@HYRTutorials Жыл бұрын
Thanks buddy 😊
@raghavendrasaicharan3188
@raghavendrasaicharan3188 3 жыл бұрын
What is difference between extends and implements.
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Implements and extends are keywords. Implements is used when you want implement the unimplemented methods from interfaces. Extends is used when you want to inherit other class properties like attributes and methods. So it is mostly used in inheritance concepts.
@ferozkhanr6653
@ferozkhanr6653 Жыл бұрын
Can we declare like RemoteWebDriver driver = new chromeDriver();
@HYRTutorials
@HYRTutorials Жыл бұрын
Yes we can declare buddy. When working with remote execution that's how we do it
@ferozkhanr6653
@ferozkhanr6653 Жыл бұрын
@@HYRTutorials How to handle captcha in selenium, any third party lib is supported ?
@HYRTutorials
@HYRTutorials Жыл бұрын
@@ferozkhanr6653 No we cant handle the capta in selenium buddy. If your application has that feature then you can ask the dev to provide some property for the capta control or you can ask them to turnoff that in the test enevs
@Sowmya598
@Sowmya598 3 жыл бұрын
Sir.. every one uses if else condition to choose d browser.. but u have used switch is der any reason behind dat.. thanks in advance
@HYRTutorials
@HYRTutorials 3 жыл бұрын
In if else condition everytime u r checking minimum 1 condition and if that condition fails then again it will go for another condition. Like that it continues condition checking. So to avoid that we have to use switch condition.
@Sowmya598
@Sowmya598 3 жыл бұрын
Thanks for d reply..😊 so in case of switch condition it directly jumps to d case on which we want to run our testscripts without​ checking each n every case
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Exactly.
@rahulyadav-cl2rd
@rahulyadav-cl2rd Жыл бұрын
@chayae3740
@chayae3740 3 жыл бұрын
Tqu
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Glad you find it helpful
@alaharimeenasri7168
@alaharimeenasri7168 3 жыл бұрын
please do more viodes on inetrview questions bro , whenever you are free...
@HYRTutorials
@HYRTutorials 3 жыл бұрын
Yeah sure, currently I'm not getting much time in this month. Will make those videos in next month for sure
@alaharimeenasri7168
@alaharimeenasri7168 3 жыл бұрын
Ok bro thanks ☺️☺️..
@116sivaramakrishnasai2
@116sivaramakrishnasai2 2 жыл бұрын
Why don't we use RemoteWebDriver?
@HYRTutorials
@HYRTutorials 2 жыл бұрын
We can use without any problem buddy. But it's just the naming convention. Remotewebdriver is mostly used for remote connections
@ksdnsdkumar1375
@ksdnsdkumar1375 2 жыл бұрын
@10:00 Thank me later.
@HYRTutorials
@HYRTutorials 2 жыл бұрын
😊
@mohanramakrishnakonijety9405
@mohanramakrishnakonijety9405 4 ай бұрын
Thank you
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 122 МЛН
The IMPOSSIBLE Puzzle..
00:55
Stokes Twins
Рет қаралды 185 МЛН
FOREVER BUNNY
00:14
Natan por Aí
Рет қаралды 32 МЛН
Turn Off the Vacum And Sit Back and Laugh 🤣
00:34
SKITSFUL
Рет қаралды 7 МЛН
How to Read Excel File using Apache POI | Selenium WebDriver |
21:25
H Y R Tutorials
Рет қаралды 46 М.
How to Do 90% of What Plugins Do (With Just Vim)
1:14:03
thoughtbot
Рет қаралды 907 М.
Selenium Webdriver Hierarchy In Interview | Automation Interview
17:26
A Practical Example How To Use Interfaces In Golang
14:42
Anthony GG
Рет қаралды 29 М.
How to Handle Frames in Selenium WebDriver
21:20
H Y R Tutorials
Рет қаралды 62 М.
Twin Telepathy Challenge!
00:23
Stokes Twins
Рет қаралды 122 МЛН