No video

Can't we use RemoteWebDriver = new ChromeDriver()? Selenium Interview Q&A - 5 [Short Answer Series]

  Рет қаралды 34,695

Naveen AutomationLabs

Naveen AutomationLabs

2 жыл бұрын

In this video, I have explained why can't we use RemoteWebDriver = new ChromeDriver()?
~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
kzbin.info%20Au...
Follow me on my Facebook Page:
/ naveenqtpexpert
Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
t.me/joinchat/9FrG-KzGlvxjNmQ1
Naveen AutomationLabs Paid Courses:
Java & Selenium:
naveenautomationlabs.com/manua...
Java & API +POSTMAN + RestAssured + HttpClient:
naveenautomationlabs.com/selen...

Пікірлер: 36
@RAbode
@RAbode 2 жыл бұрын
I know this because. . . It's secret. Thank you sir. U made easy everything with concept.
@madhuripatil8519
@madhuripatil8519 Жыл бұрын
I have gone through 3 to 4 videos on KZbin but after watching your video i finally understand the concept.thank you!
@softwaretestinglearninghub
@softwaretestinglearninghub Жыл бұрын
Great coverage as always Naveen, thank you!
@sandeepkokane9549
@sandeepkokane9549 2 жыл бұрын
Very nice explanation.Thanks Naveen 👍
@sumapatil6661
@sumapatil6661 2 жыл бұрын
Hi Naveen, Very clear explanation.Hats off to you. Thanks a lot.
@testinginsights-muktasharma
@testinginsights-muktasharma 2 жыл бұрын
Thank you Naveen!
@Nandhis
@Nandhis 2 жыл бұрын
Useful. thank you👍
@sarswatiyaliwal481
@sarswatiyaliwal481 2 жыл бұрын
Thank you so much Naveen:)
@leelajain9173
@leelajain9173 2 жыл бұрын
Thanks Naveen :)
@servantOfKripalu
@servantOfKripalu 2 жыл бұрын
Excellent video. This question had always been poking around in my mind... Thank you for clarifying this...
@RakeshSaineni
@RakeshSaineni Жыл бұрын
Loved your explanation
@pradeepprudhvi6017
@pradeepprudhvi6017 2 жыл бұрын
Very nice explanation
@srinivaspatel2567
@srinivaspatel2567 Ай бұрын
Thanks Naveen Sir
@piyushmathpal4244
@piyushmathpal4244 2 жыл бұрын
Support: 1. Say, If RWD has additional methods (which are not present in WD Interface), then we are missing out those methods while writing WD dr= new CD(); 2. Other reason to not use the above line is we need not to typecast our driver to TakesScreenShot or JSExecutor. On Contrary: 1. Interfaces are used to achieve loose coupling and pure abstraction. 2. Additional methods in interfaces would support all the implementing subclasses. Devs, would always prefer changes in an interface rather than disturbing multiple implemented classes, thus reducing the redundancy and errors.
@Udzial
@Udzial 2 жыл бұрын
Thanks @piyush , but i think first point is not right (under Support) as naveen explained from #02:40 to #02:52 , we can access the extra methods implemented by class
@adityanarayan3325
@adityanarayan3325 2 жыл бұрын
I don't get my answer, why we prefer upcast to WebDriver(I) always instead of RWD class ? please put some light on it @Naveen
@AtulSingh-go9ug
@AtulSingh-go9ug 2 жыл бұрын
Any idea on edge browser, I want to launch a specific site in ie11mode on edge browser but unable to get ie11 mode .please suggest
@ujjalpanda7345
@ujjalpanda7345 2 жыл бұрын
Hi sir, Can we change app language through Desired Capabilities by providing some code like - Device name, packageActivity? help me plz.
@gamyamentertainment4922
@gamyamentertainment4922 Жыл бұрын
Hey, hi ' i'm doing one project in google cloud . data pulling into google cloud with help of python script using automation. for that we created script , inside that i was used chrome drivers , when i execute the code , the message error has been shown like ,(chrome driver executable need to be path) like that message it was shown. i was tried different web driver and remote web drivers created one docker file on that too. So, which code will work in google cloud editor. can you please give some hint ..it very helpfull to me .
@joshibhushan1
@joshibhushan1 2 жыл бұрын
We can use it because up casting is allowed in java
@akshaygoyal1
@akshaygoyal1 2 жыл бұрын
if i use this approach then 1 more benefit, no need to cast driver in JavascriptExecutor / TakesScreenshot Please correct me Naveen if I am wrong
@akshaygoyal1
@akshaygoyal1 2 жыл бұрын
as RemoteWebdriver has all the interfaces
@user-nl6qo8cj3i
@user-nl6qo8cj3i Жыл бұрын
What will be best way to work elements inside canvas element?
@nstefi
@nstefi 2 жыл бұрын
I don't understand. The question is why can't we write "RemoteWebDriver driver = new ChromeDriver();", but that's exactly what you write at 4:12 in the video, so it's allowed. I am trying to write the same in C# and it gives me an error: "Cannot implicitly convert type 'OpenQA.Selenium.Chrome.ChromeDriver' to 'OpenQA.Selenium.Remote.RemoteWebDriver'"
@sailakshman3088
@sailakshman3088 2 жыл бұрын
For that you have to check c# selenium api, in java selenium it is fine as the architecture supports it.
@nstefi
@nstefi 2 жыл бұрын
​@@sailakshman3088 OK, I see that he is coding in Java, but still the question was "Can't we use ...?", so the answer is "Yes, we can", right? In C# I used this way: OpenQA.Selenium.IWebDriver driver = new ChromeDriver();
@vinavmevada8419
@vinavmevada8419 2 жыл бұрын
Great expectations. One observation is that for javascript executor and take screenshot interface is also part of hierarchy. If we use remotewendriver we don't need to add casting for java script executor and take screenshot interface because remote web driver hold property for javascript executor and take screenshot. But if we use Webdriver driver in this case we have to add casting for javascript executor and take screenshot because Webdriver interface does not hold property for javascript executor and take screenshot interface. 🙏
@pankajborkar1072
@pankajborkar1072 Жыл бұрын
but what is difference why everyone using WebDriver driver = new ChromeDriver();
@shafiyasunkesala3384
@shafiyasunkesala3384 2 жыл бұрын
Hi can we write searchcontext driver = new chromedriver();?
@naveenautomationlabs
@naveenautomationlabs 2 жыл бұрын
No you should not, you will get only FE and FEs from SearchContext.
@shafiyasunkesala3384
@shafiyasunkesala3384 2 жыл бұрын
@@naveenautomationlabs thank you for quick reply. I got interview question asking can we write webdriver driver= new Remotewebdriver(). My answer was to communicate with the browser we have to create instance of chrome or Firefox etc drivers. Pls let me know if we can add anything
@sp38860
@sp38860 8 ай бұрын
​@@shafiyasunkesala3384so can we write webdriver dr = new remotewebdriver()
@omshankergoyal1695
@omshankergoyal1695 2 жыл бұрын
Can we write RemoteWebdriver driver = new RemoteWebdriver(),
@dhanashreeize
@dhanashreeize 4 ай бұрын
technically its right but we cant write it in our script because with this line we wont be able to lauch any browser(we write remotewebdriver driver=new chromedriver or webdriver driver=new cromedriver() for launching the browsers) and secondly remotewebdriver constructor is private so we cannot create object of remotewebdriver.hence we cant write remotewebdriver driver=new remotewebdriver() as its of no use.
@vinaymakkar3860
@vinaymakkar3860 Жыл бұрын
why do we prefer to upcast WebDriver() instead of RWD class ? Any particular reason? Kindly explain. @naveenautomationlabs
لقد سرقت حلوى القطن بشكل خفي لأصنع مصاصة🤫😎
00:33
Cool Tool SHORTS Arabic
Рет қаралды 29 МЛН
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 10 МЛН
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 38 МЛН
Mystery of StaleElementReferenceException in Selenium WebDriver
18:10
Naveen AutomationLabs
Рет қаралды 50 М.
Misconception about RemoteWebDriver [Selenium] | LetCode
12:44
LetCode with Koushik
Рет қаралды 6 М.
SVG Graph Handling using Selenium
10:00
Naveen AutomationLabs
Рет қаралды 19 М.
How To Explain Test Automation Framework In Interviews For Selenium
13:42
لقد سرقت حلوى القطن بشكل خفي لأصنع مصاصة🤫😎
00:33
Cool Tool SHORTS Arabic
Рет қаралды 29 МЛН