pom.xmlfile for your project.
pom.xmlfile and you can double click to open it in for editing.
<dependencies>section to the file and then add the TestProject dependency:
pom.xmlfile to add the junit4 test framework into your project.
pom.xmlfiles you will need to build your package so that the dependencies get installed. Eclipse should automatically rebuild for you as soon as you save your
pom.xmlfile. If it doesn't go to This will install the TestProject Java SDK and all it's dependencies for you. Once the build has completed you will see a Maven Dependencies folder in your project and you should be ready to start creating tests in your project!
build.gradlefile in your project and add the following into the dependencies section.
importstatement to use the TestProject SDK, rather than the Selenium based import.
The following examples are based on the
ChromeDriver. However they are applicable to any other supported driver, just change the name as appropriate for the browser you are using.
src/tests/javafolder and then right clicking and selecting Package from the New menu.
TP_DEV_TOKEN. If you want to use this method for specifying your token, add an environment variable with this name to your system, and set the value of it to contain your development token.
ChromeOptions()when creating a new driver, you can also specify the token as a string. If you wanted to take this approach, Line 10 in the example above would be replaced with something like this:
ChromeDriverwith the following code:
buildsection to your
src/main/javafolder in your project and from the New menu choose the Folder option. Name the folder
assemblyand then right click on it and from the New menu select the File option. Name this file
test-jar-with-dependencies.xmland paste the following text into this file:
F5to refresh. Next, you will want to refresh Maven to make sure everything is up to date. You can do that by right clicking on the project, and going to Maven and then choosing the Update Project option.
pom.xmlfile and then click the green run button on the top menu bar and choose Maven build. You might be prompted to create a launch configuration. If you are, set the value of the Goals field to package and then click Run. Once that completes, you can right click on the package and select refresh to update the view. You should now see some files under the target folder in the Package Explorer.
-with-dependencies.jarand go to Show In>System Explorer to open the system explorer at the location of the file.