小编Led*_*der的帖子

SessionNotCreatedException:无法创建新服务:在 Ubuntu 上使用 Selenium Grid 的 GeckoDriverService 无法驱动 Firefox

我无法使用 geckodriver 从 Selenium 驱动 Firefox。这很奇怪,因为 chrome 是用相同的框架驱动的,没有错误!

这些是我的版本号:

Firefox 54.0 (64-bit)
Chrome Version 62.0.3202.94 (Official Build) (64-bit)

selenium-server-standalone-3.7.1.jar
client-combined-3.5.3-nodeps.jar

geckodriver-v0.19.1-linux64
chromedriver_linux64 

Ubuntu 16.10
Run Code Online (Sandbox Code Playgroud)

我从带有 java 的 Selenium webdriver 得到的错误如下:

--------------------------------Error:
leder@leder-VirtualBox:~/Source/SeleniumCheese/bin$ ./execute_grid.sh 
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create new service: GeckoDriverService
Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:07:36.161Z'
System info: host: 'leder-VirtualBox', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.8.0-59-generic', java.version: '1.8.0_131'
Driver info: driver.version: unknown
Command duration or timeout: 1.39 seconds
---------------------------------Schnapp
Run Code Online (Sandbox Code Playgroud)

这是我的设置,firefox 坏了,chrome 没问题: …

java firefox selenium selenium-grid selenium-webdriver

5
推荐指数
1
解决办法
1万
查看次数

生成的maven项目有编译错误:';' 预期

我正在使用改编的pom.xml建立一个新的maven java项目.编译器在生成的maven java应用程序上给出错误.为什么这样?

我使用java 1.8和java 11修改了pom.xml以进行编译,两者都不起作用.Pom.xml适用于fatjar的生成,当每个java代码被删除时,它会起作用.Pom.xml适用于junit 4.11.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.no-ip.leder.gmr</groupId>
<artifactId>gmr_mvn</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>gmr_mvn</name>
<url>http://maven.apache.org</url>

<properties>
    <jdk.version>11</jdk.version>
    <jodatime.version>2.5</jodatime.version>
    <junit.version>4.11</junit.version>
</properties>
<dependencies>
<dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <version>${junit.version}</version>
  <scope>test</scope>
</dependency>
</dependencies>
<build>
    <finalName>gmr-digital-signature-mvn</finalName>
    <plugins>



        <!-- Set a compiler level -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.3.2</version>
            <configuration>
                <source>${jdk.version}</source>
                <target>${jdk.version}</target>
            </configuration>
        </plugin>

        <!-- Maven Assembly Plugin -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.4.1</version>
            <configuration>
                <!-- get all project dependencies -->
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
                <!-- MainClass in mainfest make a executable jar -->
                <archive>
                  <manifest> …
Run Code Online (Sandbox Code Playgroud)

java maven-3

2
推荐指数
1
解决办法
363
查看次数