如何修复错误org.testng.eclipse.maven.MavenTestNGLaunchConfigurationProvider.getClasspath(Lorg/eclipse/debug/core/ILaunchConfiguration;) [英] How to fix the error org.testng.eclipse.maven.MavenTestNGLaunchConfigurationProvider.getClasspath(Lorg/eclipse/debug/core/ILaunchConfiguration;)

查看:322
本文介绍了如何修复错误org.testng.eclipse.maven.MavenTestNGLaunchConfigurationProvider.getClasspath(Lorg/eclipse/debug/core/ILaunchConfiguration;)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经编写了一个代码,该代码只打开一个网页并验证该页面的标题是否与期望的字符串匹配.

I have written a code which just opens an webpage and validates whether the page's title matches with the expected string or not.

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.Assert;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.AfterTest;

public class NewTest {
     public String website = "https://opensource-demo.orangehrmlive.com/";
     WebDriver driver = new ChromeDriver();
  @Test
  public void f() {
      String actual = driver.getTitle();
      String expected = "OrangeHRM";
      Assert.assertEquals(actual, expected);
  }
  @BeforeTest
  public void beforeTest() {
      driver.get(website);
  }

  @AfterTest
  public void afterTest() {
      driver.close();
  }

}

现在,在运行代码时,会出现一个弹出窗口,指出内部错误 { 在以下过程中发生内部错误:启动NewTest". org.testng.eclipse.maven.MavenTestNGLaunchConfigurationProvider.getClasspath(Lorg/eclipse/debug/core/ILaunchConfiguration;)Ljava/util/List; }

Now while running the code there is popup window stating an internal error { An internal error occurred during: "Launching NewTest". org.testng.eclipse.maven.MavenTestNGLaunchConfigurationProvider.getClasspath(Lorg/eclipse/debug/core/ILaunchConfiguration;)Ljava/util/List; }

推荐答案

此错误消息...

An internal error occurred during: "Launching NewTest"
org.testng.eclipse.maven.MavenTestNGLaunchConfigurationProvider.getClasspath(Lorg/eclipse/debug/core/ILaunchConfiguration;)Ljava/util/List;

...表示 TestNG Maven 相关的类文件之间存在不兼容性.

...implies that there was incompatibility between TestNG and Maven related classfiles.

从历史上看,如果安装 ,您将 M2E Maven 的复选框保留为选中.

Historically, this error would occur if while installing testng you have kept the checkbox for M2E Maven as checked.

解决此问题的最简单方法是重新安装 TestNG ,确保保留 M2E Maven 的复选框取消选中.

The easiest approach to address this issue would be to reinstall the TestNG ensuring that the checkbox for M2E Maven is kept unchecked.

这篇关于如何修复错误org.testng.eclipse.maven.MavenTestNGLaunchConfigurationProvider.getClasspath(Lorg/eclipse/debug/core/ILaunchConfiguration;)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆