WebDriver driver=new ChromeDriver(); and ChromeDriver driver=new ChromeDriver(); answer: Both are correct syntax wise, where first one has objectreference created for WebDriver interface and is assinged with object of ChromeDriver class which is also known as upcasting. this way will be most prefered as this is not tightly coupled that will allow us to assign it for something else like FirefoxDriver() if there is a need so it provides more flexibility. whereas 2nd option, we creating object reference for ChromeDriver class so we can only use it to interact with Chrome browser only.
If we use the second one than the driver has properties of both webdriver and chrome driver which will effect our script when we use that for cross browser testing so preferably we can use the first one which contains only webdriver properties that are commonly implemented for all the browser drivers
WebDriver driver = new ChromeDriver(); we can run the script in any browser like firefox, Microsoft edge But, ChromeDriver driver = new ChromeDriver(); we can run the script only on Chrome browser
WebDriver driver=new ChromeDriver(); and ChromeDriver driver=new ChromeDriver(); answer: Both are correct syntax wise, where first one has objectreference created for WebDriver interface and is assinged with object of ChromeDriver class which is also known as upcasting. this way will be most prefered as this is not tightly coupled that will allow us to assign it for something else like FirefoxDriver() if there is a need so it provides more flexibility. whereas 2nd option, we creating object reference for ChromeDriver class so we can only use it to interact with Chrome browser only.
is that the only point?
Reusability. Cross browser compatibility is one of the most important aspect of testing.
The way she answer the question was simply great....no stress ...I was looking like a general talk...this is pro level
If we use the second one than the driver has properties of both webdriver and chrome driver which will effect our script when we use that for cross browser testing so preferably we can use the first one which contains only webdriver properties that are commonly implemented for all the browser drivers
How to get hire as a fresher , there are no openings as a fresher, i learned Automation testing
Good information sir
Pls send job update sir ji for experience candidate for automation testing
Very informative video sir❤
thank you
Voice is too low
💫
WebDriver driver = new ChromeDriver(); we can run the script in any browser like firefox, Microsoft edge
But,
ChromeDriver driver = new ChromeDriver(); we can run the script only on Chrome browser
is that the only point?
Hi sir, I need your guidance about my career please let me know how can I contact with you.