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();
}
}
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; }
This error message...
An internal error occurred during: "Launching NewTest"
org.testng.eclipse.maven.MavenTestNGLaunchConfigurationProvider.getClasspath(Lorg/eclipse/debug/core/ILaunchConfiguration;)Ljava/util/List;
...implies that there was incompatibility between TestNG and Maven related classfiles.
Historically, this error would occur if while installing testng you have kept the checkbox for M2E Maven
as checked .
The easiest approach to address this issue would be to reinstall the TestNG ensuring that the checkbox for M2E Maven
is kept unchecked .
This is the error you receive for the incompatibility for Eclipse and TestNG and Maven.
Simplest Way to resolve this error is
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.