WebDriverError:不能使用反射定义类

时间:2021-08-21 01:21:39

I am using gulp-angular-protractor for end-to-end testing of my web app. I am getting the following error recently but earlier it used to work perfectly.

我正在使用gulp-angular- pro拖拉机对我的web应用程序进行端到端测试。

WebDriverError:不能使用反射定义类

Any help to fix this issue will be appreciated.

如能帮助解决这个问题,我们将不胜感激。

Details:

细节:

OS - Ubuntu 16.04,
node - v6.12.2,
npm - v3.10.10,
Vagrant - v1.9.3,
karma - v0.13.22,
gulp-angular-protractor - v1.1.1,
protractor - v5.1.2,
webdriver-manager - v12.0.6

1 个解决方案

#1


2  

Removing java-common and installing openjdk-8-jre fixed the issue for me.

删除java-common并安装openjdk-8-jre为我修复了这个问题。

To remove java-common and its dependencies, run below command

要删除java-common及其依赖项,请运行以下命令。

sudo apt-get purge --auto-remove java-common

To install openjdk-8-jre, run below command

要安装openjdk-8-jre,请在命令下面运行

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update 
sudo apt-get install openjdk-8-jdk

Additionally, if you have more than one Java versions installed on your system. Run below command set the default Java

此外,如果您的系统上安装了多个Java版本。运行下面的命令设置默认的Java

sudo update-alternatives --config java

and type in a number to select a Java version. WebDriverError:不能使用反射定义类

并输入一个数字以选择Java版本。

#1


2  

Removing java-common and installing openjdk-8-jre fixed the issue for me.

删除java-common并安装openjdk-8-jre为我修复了这个问题。

To remove java-common and its dependencies, run below command

要删除java-common及其依赖项,请运行以下命令。

sudo apt-get purge --auto-remove java-common

To install openjdk-8-jre, run below command

要安装openjdk-8-jre,请在命令下面运行

sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update 
sudo apt-get install openjdk-8-jdk

Additionally, if you have more than one Java versions installed on your system. Run below command set the default Java

此外,如果您的系统上安装了多个Java版本。运行下面的命令设置默认的Java

sudo update-alternatives --config java

and type in a number to select a Java version. WebDriverError:不能使用反射定义类

并输入一个数字以选择Java版本。