I have written codes that works in Firefox. How do I get them to work in IE and CHrome without rewritting all. I learn’t there is an interface that can be implemented to do that. Help is greatly appreciated.
Here I am writing 2 lines of code to execute all your scripts in both IE & Chrome.
//System.setProperty(“webdriver.ie.driver”, “Path of your IE server exe file”);
WebDriver driver=new InternetExplorerDriver();
//System.setProperty(“webdriver.chrome.driver”, “Path of yourChrome server exe file”);
WebDriver driver=new ChromeDriver();
If you add these lines in your code instead of FirefoxDriver, its working fine.
Thanks & Regards