Hello TP Community!
I have just started setting up my first project using TestProject OpenSDK for Java, Maven and TestNG. Before I start writing tests, I want to set a strong POM project structure. I’m looking at this example and I like it because it includes architecture for web, Android and iOS tests. However there are so many examples there and I feel confused.
I wanted to start with the POM structure I am familiar to, however when I run the LoginTest in Intellij, I am getting a WebDriver Exception:
org.openqa.selenium.WebDriverException: Failed to create an instance of io.testproject.sdk.drivers.web.ChromeDriver.
This error is caused by:
I’m running tests locally on a Ubuntu 20.04.1. Does anybody know how to solve this?
My POM project organization:
- LoginPage (extends Page)
- LoginTest (extends BaseTest)
My page objects have constructors that inherit Page class constructor. @BeforeMethod annotation in “BaseTest” class is where I instantiate ChromeDriver (using DriverBuilder). Test class “LoginTest” inherits from “BaseTest” and it does not call driver instance directly.
I am getting this error (java.util.stream.Collector com.google.common.collect.ImmutableList.toImmutableList()) even when I try to run the basic test example from this page.
If it helps, I’ll push my project to GitHub and share a link with anyone who’d like to take a look at it?
Also, is there a way to benefit from the Test Runs on the TP Platform for cross-browser testing when running coded tests? Or should I add a BrowserFactory class and code the cross-browser instructions to enable tests running on multiple browser?