Windows 7 上 ChromeDriver 二进制文件和 Chrome 二进制文件的默认位置 [英] Default location of ChromeDriver binary and Chrome binary on windows 7

查看:46
本文介绍了Windows 7 上 ChromeDriver 二进制文件和 Chrome 二进制文件的默认位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Windows 7 上使用 java-client.jar 触发 appium 的 ChromeDriver 二进制文件和 Chrome 二进制文件的默认位置是什么?如果我使用 RemoteWebDriver 并尝试启动 chrome 浏览器,selenium 从哪里启动 chromedriver?

代码:

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);

解决方案

chromedriver 默认情况下未安装在您的系统中.用户必须单独从

注意:对于 Linux 系统,ChromeDriver 期望 /usr/bin/google-chrome 是指向实际 Chrome 二进制文件的符号链接.您还可以按照文档 在非标准位置使用 Chrome 可执行文件.

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);

解决方案

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.

这篇关于Windows 7 上 ChromeDriver 二进制文件和 Chrome 二进制文件的默认位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆