Testing Robot Framework驱动程序中出现错误(驱动程序可执行文件的路径必须由webdriver.chrome.driver设置)

Testing Robot Framework驱动程序中出现错误(驱动程序可执行文件的路径必须由webdriver.chrome.driver设置),testing,robotframework,Testing,Robotframework,我创建了以下java类: public class setup { public void browserSetup() { // System.setProperty("webdriver.chrome.driver","/home/cangouser-38/Documents/mohan/chromedriver"); } 我的robot框架测试用例如下所示: *** Settings *** Documentation A resource file con

我创建了以下java类:

public class setup {    
    public void browserSetup() {
      // System.setProperty("webdriver.chrome.driver","/home/cangouser-38/Documents/mohan/chromedriver");
}
我的robot框架测试用例如下所示:

*** Settings ***
Documentation  A resource file containing the application specific keywords
Library     Selenium2Library
Library     com.Auto.Robot.SeleniumRobot.setup

*** Test Cases ***
Check out joe colantonio dot com
    Open Browser  https://www.google.com  gc
    Close Browser

驱动程序可执行文件的路径必须由webdriver.chrome.driver系统属性设置;有关详细信息,请参阅。最新版本可从chromedriver下载。exe:-)

使用我自己的Chrome配置文件进行设置:

// path to chromedriver.exe    
System.setProperty("webdriver.chrome.driver", "C:\\Users\\pburgr\\Desktop\\chromedriver\\chromedriver.exe");

// new instace of ChromeOptions
ChromeOptions options = new ChromeOptions();

// add arg to load Chrome with my own profile instead of a temporary profile
options.addArguments("user-data-dir=C:\\Users\\pburgr\\AppData\\Local\\Google\\Chrome\\User Data");

// new instance of ChromeDriver with added args
driver = new ChromeDriver(options);

// maximaze current window, can be used later again if window get minimaze or after a new window is opened (in Chrome no switch is needed)
driver.manage().window().maximize();

OP的环境是*nix——检查提供的路径,问题是在Robotframework的上下文中,而不是普通的java+webdriver selenium。