The import com.opencsv cannot be resolved


#1

I’m learning how to do data driven testing using the trial version of Webtestit. When I download the sample csv data-driven test, the line for importing com.opencsv is fine. But in my own test, it’s giving me a ‘cannot be resolved’ message. What am I missing?


#2

Hello @ohrnsk
It seems like you haven’t added the opencsv dependency in your project’s pom.xml.
to do so, add the following next to the other existing dependencies in your pom.xml file located in the project tree and save the file. Ranorex Webtestit will automatically download and configure the dependency

<dependency>
  <groupId>com.opencsv</groupId>
  <artifactId>opencsv</artifactId>
  <version>3.8</version>
</dependency>

Find out more about the opencsv library here.
And if you want a detailed explanation of the data-driven sample, hop over to this post which explains the data-driven sample by steps.

Kind regards.


#3

Thanks! That did the trick.


closed #4