Cucumber class cannot be resolved to a type

5,781 views
Skip to first unread message

Vishnu Sai

unread,
Jun 25, 2019, 1:11:48 PM6/25/19
to Selenium Users
Hello,

testrunner.png

repository1.png

repository2.png

i'm facing an issue in cucumber. i'm unable to import the (cucumber.class{junit})  i tried so many ways like adding the dependencies (info.cukes for junit or io.cucumber for junit) but still im facing the issue. if any one knows the solutions suggest me please.

grtGpt

unread,
Jun 26, 2019, 3:33:29 AM6/26/19
to Selenium Users
Hi Vishnu,

Guess you can refer the solutions mentioned here https://stackoverflow.com/questions/51151585/cucumber-cannot-be-resolved-to-a-type and hopefully should resolve your issue as well

Regards.

Mohd Shahid

unread,
Jun 26, 2019, 3:58:55 AM6/26/19
to Selenium Users
Did you installed the Cucumber Plugin ?


On Tuesday, June 25, 2019 at 10:41:48 PM UTC+5:30, Vishnu Sai wrote:

Vishnu Sai

unread,
Jun 26, 2019, 4:18:26 AM6/26/19
to seleniu...@googlegroups.com
Yes I installed the plugin

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/cacc35e7-bd5b-430c-adec-dabc17993d7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mohd Shahid

unread,
Jun 26, 2019, 4:24:57 AM6/26/19
to Selenium Users
Try with these dependencies and versions. Hope it will work
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.6</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>4.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>4.2.0</version>
</dependency>

On Tuesday, June 25, 2019 at 10:41:48 PM UTC+5:30, Vishnu Sai wrote:

Jagu Lakshmi Pavani

unread,
Jun 26, 2019, 10:00:17 AM6/26/19
to seleniu...@googlegroups.com
Hi,
  Please make the fiollowing changes

1- change your folder structure:

src
  |
  test
     |
     your-package
                |
                YourClass

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--
Lakshmi Pavani Jagu,
+56 961133614,
jlpav...@gmail.com

Vishnu Sai

unread,
Jun 27, 2019, 3:34:34 PM6/27/19
to seleniu...@googlegroups.com
Thanks dude it working.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages