Meta :-
Steps to reproduce :-
When I use below code it launches Firefox
browser :
System.setProperty("webdriver.chrome.driver", "path/to/geckodriver.exe"); WebDriver driver = new ChromeDriver(); driver.get("https://www.google.co.in");
When I use below code it launches IE
browser :
System.setProperty("webdriver.chrome.driver", "path/to/iedriverserver.exe"); WebDriver driver = new ChromeDriver(); driver.get("https://www.google.co.in");
Questions :-
selenium
opens browser on the basis of executable driver
setting? FirefoxDriver
, InternetExplorerDriver
, ChromeDriver
etc? The selenium project just attempts to launch the executeable and the request a new session from it. The problem here is that chromedriver readily accepts the new session request for "firefox", but it shouldn't.
It is a bug, actually, there was the thread regarding this on git hub for selenium board. If we pass chromedriver.exe for webdriver.gecko.driver , it works and opens chrome browser
Hope it helps.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.