Selenium Code Errors on Eclipse Compiler

+1 vote

After added the external JAR library, I still encountered 3 items errors from the Selenium code provided by Edureka.

Line1: import static org.testng.Assert.assertEquals;

Line7: import org.testng.annotations.Test;

Line 23: assertEquals(test, "This is about page. Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.");

Errors: (3 items):

Description Resource Path Location Type

The import org.testng cannot be resolved App.java /DevOps/src line 1 Java Problem

The import org.testng cannot be resolved App.java /DevOps/src line 7 Java Problem

The method assertEquals(String, String) is undefined for the type App App.java /DevOps/src line 23 Java Problem


When I complied it, I encountered "Exception in thread "main" .java.lang.Error:Unresolved compilation problem:" (see attached)
Kindly advise how I can fix it as I have tried most of the jar files - selenium-java-3.141.59.jar, selenium-server-standalone-3.141.59.jar and junit-4.12.jar.


The method assertEquals(String, String) is undefined for the type App

Exception in thread "main" java.lang.Error: Unresolved compilation problem: 

at App.main(App.java:23)

Jul 15, 2019 in DevOps Tools by limcw
• 270 points
1,296 views
Have you added the dependency jars to the build path and after that restarted eclipse? U could probably try this.

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In DevOps Tools

0 votes
0 answers
0 votes
1 answer

devops sublime on devops tools list????

Sublime isn't as such a devops tools. ...READ MORE

answered Jun 1, 2018 in DevOps Tools by DareDev
• 6,890 points
683 views
0 votes
1 answer
0 votes
1 answer

Gunicorn stuck on docker when run is executed with flask application

Here's something that you could try: Check your ...READ MORE

answered Jun 14, 2018 in DevOps Tools by ajs3033
• 7,300 points
6,637 views
0 votes
1 answer

dpkg a deb file in a local fodler on vagrant

Copy the file in the vagrant folder ...READ MORE

answered Jun 14, 2018 in DevOps Tools by DareDev
• 6,890 points
637 views
0 votes
1 answer

How to deploy kafka cluster on cloud?

You can run kafka in both ways ...READ MORE

answered Jun 14, 2018 in DevOps Tools by DareDev
• 6,890 points
662 views
0 votes
1 answer

Does the avi networks controller work on VMware Fusion 7 or 8 on OS X?

Avi Controller is supported on VMWare Fusion ...READ MORE

answered Jul 3, 2018 in DevOps Tools by Kalgi
• 52,350 points
632 views
+1 vote
2 answers

Trying to make a PHP code work in bluemix

example to @Nilesh's explanation: $html = '<html> ...READ MORE

answered Oct 25, 2018 in DevOps Tools by akaash
766 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP