Setting up the TestNG classpath in a Maven project

I encountered a problem while executing my Testng Project

Error: Unable to locate or load main class org.testng.remote.RemoteTestNG

Here is the content of my POM.xml file

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.project</groupId>
  <artifactId>WeWalkThru</artifactId>
  <version>0.0.1-SNAPSHOT</version>

  <dependencies>
    <!-- https://mvnrepository.com/artifact/org.testng/testng -->


    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.14.3</version>
        <scope>test</scope>
    </dependency>

        <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
    <dependency>
        <groupId>org.seleniumhq.selenium</groupId>
        <artifactId>selenium-java</artifactId>
        <version>3.141.59</version>
    </dependency>      
  </dependencies>
</project>

Answer №1

Since testng version 6.9.9, the class RemoteTestNG has been removed. To resolve this issue, you need to either upgrade or downgrade the Eclipse TestNG plugin. This problem stems from a compatibility issue between the TestNG Maven dependency and the TestNG Eclipse plugin.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How to set up npm to utilize the maven directory format and deploy war files

Embarking on my very first pure front-end project, I decided to deploy it using Java/Maven. To begin, I set up a standard WAR project: │ package.json │ pom.xml │ tsconfig.json │ typings.json │ │ ├───src │ └───main ...

Choosing Frames within node.js

I am facing an issue with switching to nested frames in selenium-webdriver using node.js. Despite trying various approaches such as setting timeouts for page loading and frame switching, I am still encountering a NoSuchFrameError. This problem seems to be ...

Tips for bypassing captcha and avoiding Selenium detection

I wrote a Python script that logs into a specific page (sso.acesso.gov.br) using certain credentials and then typically solves a captcha using the 2Captcha API. However, recently I have been encountering an error after solving the captcha, even when I do ...

The class Actions is not functioning properly in the ChromeDriver

Having trouble with the import of the Actions class in ChromeDriver. My setup includes chromedriver 2.29 + selenium webdriver 3.4.0 + Chrome 58.0.3029.96 + Eclipse Neon.3 Release (4.6.3). When I attempt to use the shortcut Ctrl + Shift + O for auto importi ...

Is there a specific link where I can download the Edge browser, similar to how we can easily find one

Is it possible for me to receive the URLs list where I can download the setup file for the Edge browser? Similar to how we have for Chrome in the following link: ...

Selenium is being used to block login automation in Edge modal

Currently, I am working on a Python script to automate logging into Edge using msedge-selenium-tools. However, when running the script, a modal window pops up and I am facing challenges in identifying CSS selectors to use with Selenium. Here is the snippet ...

What is the best way to create a function that allows us to "wait for ajax" to load before proceeding with the page and then easily reuse that function in other test methods

I have been experimenting with different waiting options, but I am unable to click the button. It seems like the AJAX is taking time to load the page. How can I create a function to wait for AJAX and use it in other methods when needed? for (int row = 1; ...

When multiple radio button sections are visible, determining the total count of radio buttons within a specific section becomes challenging

Currently, I am teaching myself how to use Selenium. My goal is to automate the demo website provided at . This website includes a section with radio buttons for selecting gender. I have been trying to determine the number of elements within that specific ...

Adding DesiredCapabilities to GeckoDriver in Selenium-Java 3.11: A Step-by-Step Guide

Currently, I am attempting to utilize GeckoDriver with Firefox in selenium-java 3.11. The version of Firefox I am using is 59. So far, everything is running smoothly and I am able to initiate the Firefox driver. However, my main obstacle lies in the need t ...

Can you explain the slow parameter feature in Mocha?

While configuring mochaOpts in Protractor, one of the parameters we define is 'slow'. I'm unsure of the purpose of this parameter. I attempted adjusting its value but did not observe any impact on the test execution time. mochaOpts: { re ...

Unable to retrieve the text content within a span element using Python Selenium

I am currently working on a Python project with the objective of extracting data from an estate portal. My code is written in Python and I am utilizing the Selenium package for web scraping. The main challenge I am facing is when trying to extract text fro ...

Struggling to access a webpage through Java Selenium ChromeDriver when utilizing ChromeOptions

Currently, I am facing an issue while using Java Selenium's ChromeDriver to access my personal Google profile and navigate to a specific website. Surprisingly, when I log in to my profile, I cannot successfully navigate to any website. However, if I r ...

Tips for retrieving the URL of the selected article, rather than the Google News site

When you run the code provided, it randomizes categories and selects the first article from a new site. However, after waiting for 10 seconds for the site to load using time.sleep(10), the issue arises where instead of collecting the URL of the newly loade ...

Having trouble interacting with element - Selenium WebDriver is not allowing the click

I'm attempting to select the Checkout Button. This is what it looks like : https://i.stack.imgur.com/TiMEO.png And here's the HTML snippet for it : <div id="buy-button-next"> <span data-reactroot=""> <div data-cid="buy- ...

Is Selenium Service not recognizing the executable_path parameter?

Currently using Selenium 4.1.5, I encountered an issue while trying to execute the following code: from selenium import webdriver from selenium.webdriver.chrome.service import Service service = Service(executable_path=f'./chromedriver.exe') driv ...

Avoiding Special Characters in cssSelector Webdriver

How do I avoid the special character so that I can utilize the ID on the div to access the form? Below is my CSS selector: #form > div:nth-child(4)>div:nth-child(2) > div:nth-of-type(2) > div:nth-of-type(2) Here is the corresponding HTML cod ...

Capturing Screenshots as Numpy Arrays Using Selenium WebDriver in Python

Can selenium webdriver capture a screenshot and transform it into a numpy array without saving it? I plan to use it with openCV. Please keep in mind that I'm looking for a solution that avoids saving the image separately before using it. ...

When attempting to load a new page from an iframe by clicking a button, the selenium driver fails to retrieve the page source of the newly loaded page

I am currently working on creating a WebDriver using selenium with Python. I have successfully switched to an iFrame using driver.switch_to.frame(driver.find_element(by=By.CSS_SELECTOR, value='iframe[id="iframe_id"]')). Within the iFram ...

Having trouble finding the email and password fields on the Nordstrom website while attempting to create an account

To get started, follow these steps: 1. Go to the Nordstrom Rack website and click on the Sign Up button. 2. When the pop-up appears, enter your email and password to create an account. Here is the code snippet: class EntryPoint { static void ...

I am looking to create a for loop that will automate the process of clicking on multiple links and navigating back to the previous page

Below is the code I have written to achieve a specific task: my_list = WebDriverWait(driver, 20).until(EC.visibility_of_all_elements_located((By.XPATH, "//table[@border='1']//a"))) for option in my_list: option.click() WebDriver ...