0

I have a Selenium with Java project in VSCode using Jenkins and Maven, however it's never been able to debug or step over or step into the code. Upon clicking the Debug Test from within the code the Debug console mentions :

Using chromedriverPath null
Using recordingDirectory path null

===============================================
Default Suite
Total tests run: 1, Passes: 0, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 1
===============================================

When I run the program from the cmd prompt it runs fine and the automation executes fine.

When I Run and Debug using the Explorer > [Launch (Class name)], the action bar appear then disappears and the terminal shows:

Error: Main method not found in class XXXX, please define the main method as:
   public static void main(String[] args)
or a JavaFX application class must extend javafx.application.Application

My launch.json is

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        
        {
            "type": "java",
            "name": "Debug (Launch)",
            "request": "launch",
            "mainClass": "xxx"
        },


        {
            "type": "java",
            "name": "Launch Current File",
            "request": "launch",
            "mainClass": "${file}"
        },
        {
            "type": "java",
            "name": "Launch Class name",
            "request": "launch",
            "mainClass": "xxx",
            "projectName": "xxx"
        }
    ]
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.