我有了这个路径取代:反斜杠在Java路径
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
,我需要它为options.setBinary
。问题是由于反斜杠,我在java中出现错误,但那是我的路径!
我也尝试使用此:
String newString = text.replace(...);
但我的命令需要的路径,并发送错误,如果我添加新的字符串
options.setBinary(" /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome ");
我能做些什么?
你有一个正斜杠和反斜杠的路径? –
是的,当我想在我的终端中运行应用程序时,这是我拥有的路径。此外,这是我需要使用在这里说:https://code.google.com/p/selenium/wiki/ChromeDriver – Mxfrd