“Error: Main method not found in class nissan.lakshmi, please define the main method as:public static void main(String[] args) [duplicate]

The problem is that Java is searching for the method: public static void main(String[] args) and you only have:

public static void main() {     
        tc1();      
}

Which is not the same. So you need to add the parameter String[] args.
This parameter is a list of all the parameters that were passed in when the java application was called.

Update:

After adding that now it is saying A java Exception has occured

Chances are that there is an issue with the driver or the project setup, make sure the driver is properly imported. If the problem persists do this

Leave a Comment