'Could not find or load main class org.testng.remote.RemoteTestNG - in Eclipse

I've tried to update Selenium webdriver version and now i cant run my tests because of following exception:

Error: Could not find or load main class org.testng.remote.RemoteTestNG

Environment on which it was working fine:

Selenium 2.53 jar
Webdriver 2.53.1
Java 7

Environment that rises an Error:

Selenium 3.5 jar
Webdriver 3.5
Java 8

I need to run it from eclipse, not commnd line

enter image description here



Solution 1:[1]

Some points to check:

  • Check your build path and make sure all required packages are present there.
  • Make sure your build path does not contain any redundant packages
  • Check for packages compatibility
  • Eventually move out from the manual packages managing and let Maven do it for you.

Solution 2:[2]

Always Try to use the latest version of TestNG: From Properties>TestNG>

You can uncheck the box called "Use project TestNG jar"

Date-19-June-2019

<!-- https://mvnrepository.com/artifact/org.testng/testng -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.3</version>
<scope>test</scope>
</dependency>

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mykola
Solution 2 VivekVadher