硒中chrome驱动程序的默认选项不起作用。我必须传递这些参数:
'--headless',
'--no-sandbox',
'--disable-dev-shm-usage'
但是我不想在所有客户端上传递它们,我想在服务器上设置它们。
根据本主题:Passing options to chrome driver selenium
...试试这个:
xvfb-run -a java -Dwebdriver.chrome.driver=/usr/local/bin/chromedriver -jar /usr/local/bin/selenium-server-standalone.jar -Dwebdriver.chrome.args="--headless"
...昂:
Exception in thread "main" com.beust.jcommander.ParameterException: Was passed main parameter '-Dwebdriver.chrome.args=--headless' but no main parameter was defined in your arg class
我应该将哪些系统参数传递给Java?