Solving “An internal error occurred during Launching TestNGFile” Problem in Selenium
If you are here, you have probably encountered the notorious “An internal error occurred during Launching TestNGFile Problem” in Selenium. The message must also be saying that it has something to do with the java.lang.NullPointerException. First of all, I would say relax! There’s no need to panic. Nothing good has ever come of it. The DITD doctor is here, and I will literally walk you through this situation.
The TestNGFile issue is basically being caused by the presence of TestNG M2E part in your installed software list. You just gotta remove that, and the problem will solve itself.
You might be getting something like this while trying to run your code:
Here’s a step by step process explaining how to exactly do that and fix this issue.
Steps to Solve An Internal Error Occurred During Launching TestNGFile Problem
Step 1: Navigate to Help> Install New Software…
When you click on it, here’s what you will get:
Step 2: Now click on What is already installed? as shown in the picture above.
It will open a new window showing all that is already installed on your Eclipse.
Step 3: Look for TestNG M2E (Maven) Integration (Optional) option in the list. Must be at the bottom or something. Just click on it. It will make highlight the “Uninstall…” option at the bottom.
Step 4: Go ahead and uninstall it by clicking on the “Uninstall…” button.
Step 5: Just click on Finish.
The uninstallation will begin to happen. When it will be done, it will ask for a restart.
Step 6: Click on Yes.
Wait for Eclipse IDE to restart once again. When it will restart just go to your program that you were trying to run and click on Run (green button).
This time you will not face the same “internal error” message anymore.
Here I have made a cool video explaining the entire process on Youtube:
Did this method work for you? Let me know in the comments section below.