Default location of ChromeDriver binary and Chrome binary on windows 7

怎甘沉沦 提交于 2020-06-13 05:34:27

问题


What is the default location of ChromeDriver binary and Chrome binary on windows 7 for triggering appium using java-client.jar? if i am using RemoteWebDriver and tries to initiate chrome browser, from where does the selenium initiates the chromedriver?

the code:

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("userName", ReadProperties.Properties("MobileUsername"));
capabilities.setCapability("password", ReadProperties.Properties("MobilePassword"));
capabilities.setCapability("udid", ReadProperties.Properties("MobileUID"));
capabilities.setCapability("browserName", ReadProperties.Properties("MobileBrowser"));
capabilities.setCapability("platformName", ReadProperties.Properties("MobilePlatform"));
log.Info(capabilities.getVersion());
mobile_driver = new RemoteWebDriver(new URL(""+ReadProperties.Properties("MobileURL")+"/wd/hub"),capabilities);

回答1:


chromedriver is not installed in your System by default. Users individually have to download chromedriver from ChromeDriver - WebDriver for Chrome page and you can place it anywhere within your system.

You must ensure that Chrome is installed at the optimum location as the server expects you to have Chrome installed in the default location for each system as per the snapshot below :

Note : For Linux systems, the ChromeDriver expects /usr/bin/google-chrome to be a symlink to the actual Chrome binary. You can also override the Chrome binary location following the documentation Using a Chrome executable in a non-standard location.




回答2:


The location will depend on your default download folder e.g. when you download something from the internet and it goes into the downloads folder, then that is your default download folder.

So if you downloaded chromedriver.exe the same way, then it will also be in the downloads folder.




回答3:


If you are using 3rd party service to run your tests you should not care about chromedriver.

But when you run tests locally you have to download it yourself: https://chromedriver.storage.googleapis.com/index.html And then use capability to set absolute path to this file. Make sure you use chromedriver version compatible with your browser version.



来源:https://stackoverflow.com/questions/49697349/default-location-of-chromedriver-binary-and-chrome-binary-on-windows-7

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!