我正在尝试以无头模式运行soapui,但是在启动webdriver部分时,Chrome似乎看不到驱动程序已启动
我尝试了chrome和driver的74和73版本。
我尝试将服务器和语言绑定附带的所有硒罐添加到soapuis /bin/ext
目录中,然后将其删除。
我已将server.jar文件设置为chown 7777
(是的,我知道我知道!)。我已经安装了Xvfb,甚至是Xorg桌面...
sh /home/venerable/SmartBear/SoapUI-5.5.0/bin/testrunner.sh -c 'tester2' -s 'Regression' "/home/venerable/projects/opengoogle" -t "/home/venerable/soapui-settings.xml" -f "/home/venerable/logs" -r -I
和常规脚本:
import org.openqa.selenium.WebDriver
import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions
System.setProperty("webdriver.chrome.driver","/home/venerable/driver/chromedriver")
System.setProperty("webdriver.chrome.logfile","/home/venerable/driver/chromedriver")
log.info 'from system: '+ System.getProperty("webdriver.chrome.driver")
ChromeOptions chromeOptions = new ChromeOptions()
chromeOptions.addArguments("--headless")
log.info '################# starting driver #################'
WebDriver driver = new ChromeDriver(chromeOptions)
log.info '================ driver started ================'
driver.get("http://www.google.com")
log.info ":):):):):):):):):)closing driver:(:(:(:(:(:(:(:(:(:("
driver.close()
driver.quit()
return
堆栈跟踪
18:30:58,176 INFO [DefaultSoapUICore] initialized soapui-settings from [/home/venerable/soapui-settings.xml]
18:30:58,865 INFO [PluginManager] 0 plugins loaded in 3 ms
18:30:58,865 INFO [DefaultSoapUICore] All plugins loaded
18:31:00,576 INFO [WsdlProject] Loaded project from [file:/home/venerable/projects/opengoogle]
18:31:00,587 INFO [SoapUITestCaseRunner] Running SoapUI tests in project [tester]
18:31:00,588 INFO [SoapUITestCaseRunner] Running TestCase [tester2]
18:31:00,597 INFO [SoapUITestCaseRunner] Running SoapUI testcase [tester2]
18:31:00,597 INFO [SoapUITestCaseRunner] running step [Groovy Script]
18:31:01,176 INFO [log] from system: /home/venerable/driver/chromedriver
18:31:01,214 INFO [log] ################# starting driver #################
Starting ChromeDriver 74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}) on por
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Failed to redirect stderr to log file.
Unable to initialize logging. Exiting...
May 27, 2019 6:31:21 PM org.openqa.selenium.os.OsProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
18:31:21,470 ERROR [SoapUI] An error occurred [Timed out waiting for driver server to start.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'ebu-venerable', ip: '10.33.134.55', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-el7.x86_64', java.version: '1.8.0_212'
Driver info: driver.version: ChromeDriver], see error log for details
org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'ebu-venerable', ip: '10.33.134.55', os.name: 'Linux', os.arch: 'amd64', os.version: '3.10.0-el7.x86_64', java.version: '1.8.0_212'
我在耐心训练的尽头。有很多关于此的文章(我现在大多数都找不到)