1. Add User library to eclispe:
1. Click the window menu of eclipse and select "preference"
2. In the preferences window, select Java-> User libraries, and then click New... in the dialog box that appears, enter the name of the user library.
Library name.
3. Add a jar package to the user library. Select my_lib and click Add jars... click, select the jar you want to add, and click "open". The JAR file information you just added will appear in the my_lib library.
4. Click "OK" in the window to add the user library and its jar.
You can select export to create a new user library, and you can see the content clearly.
If you are familiar with it, you can directly create a XXX. userlibraries file and put it under the project. Format :\
<? XML version = " 1.0 " Encoding = " UTF-8 " Standalone = " No " ?>
< Eclipse - Userlibraries version = " 2 " >
< Library name = " Testlib " Systemlibrary = " False " >
< Archive path = " /$ {Projectname}/lib/selenium-java-client-driver.jar " />
< Archive path = " /$ {Projectname}/selenium-java-client-driver-tests.jar " />
< Archive path = " /$ {Projectname}/testng-5.14.1.jar " />
</ Library >
</ Eclipse - Userlibraries >