TestNG Version 6.13.1
Starting ChromeDriver 2.37.544337 (8c0344a12e552148c185f7d5117db1f28d6c9e85) on port 47944
Only local connections are allowed.
FAILED CONFIGURATION: @BeforeTest setup
Session Not Created Excpetion:session not created exception
from disconnected: unable to connect to renderer
(Session info: chrome=65.0.3325.181)
(Driver info: chromedriver=2.37.544337 (8c0344a12e552148c185f7d5117db1f28d6c9e85),
platform=Mac OS X 10.13.4 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 571 milliseconds
Build info: version: '3.11.0'
使用Maven依赖
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.11.0</version>
</dependency>
代码是:
Public class Trans extends Base{
@BeforeTest
public void setup()throws IOException{
driver = globalDriver();
从Base调用GlobalDriver:
WebDriver driver = new ChromeDriver();