0

Building the framework on Java/Eclipse/Selenium WebDr/Page Factory to create my tests. But when running the test, it gives an error that says:

"Error: Main method not found in class, please define the main method as: public static void main(String[] args) "

Even if I add the main method, the test still won't be run. Please, help with how the main method should be inserted into my test, or any other suggestions. The code example is below:

Test example:

enter image description here

0xCursor
  • 2,242
  • 4
  • 15
  • 33
Y_Sh
  • 121
  • 2
  • 4
  • 14
  • Please edit your question and share the code that you are having this error with. And also the code where you tried adding the main method. – Sheldon Mar 07 '18 at 19:42
  • Are you using JUnit or TestNG? How are you attempting to run the project? – Bill Hileman Mar 07 '18 at 19:47
  • Thanks for your help. My mistake was in missing the @AfterClass public void endTest() { } } – Y_Sh Mar 07 '18 at 20:40

0 Answers0