0

I am learning Selenium.. I have successfully installed Testng on my machine but unable to import @Test from Testng while writing the script.below is the error message.

@Test

Error:

Syntax error, insert "EnumBody" to complete ClassBodyDeclarations**

what does this Enumbody error indicates.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352

1 Answers1

0

This error message...

Syntax error, insert "EnumBody" to complete ClassBodyDeclarations

...implies that eclipse detected a syntax error in your code.

Presumanbly, you have tried something in the similar lines:

public enum Foo;

which produces the error as:

Syntax error, insert "EnumBody" to complete ClassBodyDeclarations

Some more details about your usecase, program structure, eclipse version, syntax error recovery and reporting components of the Eclipse JVM would have helped us to analyze the error in a better way. However, this error:

EnumBody to complete ClassBodyDeclarations

signifies that an unusual syntactic error have misled the compiler's syntax error recovery module algorithm. Possibly, it's a bug within within the Enumerations module which is handled in a different fashion than the other tokens which causes it to be recovered in a different way and hence shows up the syntax error.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352