I've Eclipse and TestNG. I've played around with several projects using testng.xml. Now I want to run the projects using POM.xml. I've installed maven and created a new maven project. After creating a script I opened my pom.xml file and copied a sample pom.xml file that I copied from online but unfortunately I received TestNG dependency error. I assumed the error was because of incorrect TestNG version. So I went to Eclipse menu Help->About Eclipse IDE->Installation Details and got the version# of the TestNG that I'd installed.
TestNG M2E (Maven) Integration (Optional) 7.2.0.202004281604 org.testng.eclipse.maven.feature.feature.group TestNG Team
So I added the 7.2.0 to TestNG dependency to my Pom.xml but it's still showing error for TestNG dependency
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.2.0</version>
<scope>test</scope>
</dependency>
After some research I found this site https://mvnrepository.com/artifact/org.testng/testng
My question is why does eclipse show that I installed 7.2.0 version of TestNG when there is no 7.2.0 TestNG version to begin with? Anyhow version 7.3.0 finally worked. I don't understand why did version 7.3.0 work when I've 7.2.0 version installed on my machine.
My second question is how do I find out what my Selenium-Java version I've installed on my machine?
I've tried looking under Java Build Bath->Libraries tab and noticed that JRE System Library has JAVASE-13 and the Classpath is showing different version for different jar files. For example
byte-buddy-1.8.15.jar
client-comined-3.141.59-srouces.jar
commons-codec-1.13.jar
Can someone please help me how do I go about finding out the correct selenium-java version? Shouldn't maven just download the version I add under dependency?
Thanks in advance