简体   繁体   中英

1. COMPILATION ERROR and BUILD FAILURE occurred while running the Maven project (Selenium, Java) , Run As-> Maven test .How to fix this compiler error

在此处输入图像描述

在此处输入图像描述

  1. COMPILATION ERROR and BUILD FAILURE occurred while running the Maven project (Selenium, Java), Run As-> Maven test. 2. Error package org.testng does not exist

How can I fix this compiler error issue, while running my Test Scripts in Selenium Automation tool. I have a Maven project configured with Test NG in Eclipse. I am automating and running Java Test Scripts in my Selenium Automation Tool. I am using Eclipse for JAVA EE developer IDE, Oxygen version to execute my Selenium Scripts. I tried to use JAVA JDK 11.0.10 but I got the JRE error, so I uninstalled JDK 11.0.10 version and Currently I am using Java JDK 1.8.0_151.

instead of using the physical path try use below dependency in your pom.xml

<dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.8.8</version>
        </dependency>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM