Please help- Its URGENT

1,525 views
Skip to first unread message

Vino Maddy

unread,
Jun 21, 2016, 6:26:11 AM6/21/16
to Cukes
Hi,

I m using the below jars for my cucumber -java framework. when i run the feature file from eclipse using run as feature i am getting error.

jars used:

junit - 4.11
cucumber-core - 1.1.7
httpclient - 4.3.3. 
cucumber-java - 1.2.0
cucumber - junit - 1.1.6
selenium-java - 2.41.0
commons- configuration - 1.10 

------------------------------
java version 1.7
eclipse kepler




error message:

Usage: java cucumber.api.cli.Main [options] [ [FILE|DIR][:LINE[:LINE]*] ]+

Options:

    -g, --glue PATH                        Where glue code (step definitions and hooks) is loaded from.
    -f, --format FORMAT[:PATH_OR_URL]      How to format results. Goes to STDOUT unless PATH_OR_URL is specified.
                                           Built-in FORMAT types: junit, html, pretty, progress, json.
                                           FORMAT can also be a fully qualified class name.
    -t, --tags TAG_EXPRESSION              Only run scenarios tagged with tags matching TAG_EXPRESSION.
    -n, --name REGEXP                      Only run scenarios whose names match REGEXP.
    -d, --[no-]-dry-run                    Skip execution of glue code.
    -m, --[no-]-monochrome                 Don't colour terminal output.
    -s, --[no-]-strict                     Treat undefined and pending steps as errors.
        --snippets [underscore|camelcase]  Naming convention for generated snippets. Defaults to underscore.
        --dotcucumber PATH_OR_URL          Where to write out runtime information. PATH_OR_URL can be a file system
                                           path or a URL.
    -v, --version                          Print version.
    -h, --help                             You're looking at it.

Exception in thread "main" cucumber.runtime.CucumberException: Unknown option: --plugin
at cucumber.runtime.RuntimeOptions.parse(RuntimeOptions.java:130)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:77)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:70)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:62)
at cucumber.api.cli.Main.run(Main.java:31)
at cucumber.api.cli.Main.main(Main.java:18)


Thanks,
Vinoth
9952750093

George Dinwiddie

unread,
Jun 21, 2016, 9:18:32 AM6/21/16
to cu...@googlegroups.com
Vinoth,

On 6/21/16 6:26 AM, Vino Maddy wrote:
> Hi,
>
> I m using the below jars for my cucumber -java framework. when i run the
> feature file from eclipse using run as feature i am getting error.
>
> jars used:
>
> junit - 4.11
> cucumber-core - 1.1.7
> httpclient - 4.3.3.
> cucumber-java - 1.2.0
> cucumber - junit - 1.1.6
> selenium-java - 2.41.0
> commons- configuration - 1.10

You seem to have mis-matched cucumber jar versions, and are not using
the latest.
--
----------------------------------------------------------------------
* George Dinwiddie * http://blog.gdinwiddie.com
Software Development http://www.idiacomputing.com
Consultant and Coach http://www.agilemaryland.org
----------------------------------------------------------------------

Justin Radcliffe

unread,
Jun 21, 2016, 10:30:52 AM6/21/16
to Cukes
Yes, make sure you upgrade to 1.2.4 if you can for all:

cucumber-core-
cucumber-java-
cucumber-junit-

plugin is now format in the new version but i think you are using the older junit casing this issue.

Vino Maddy

unread,
Jun 21, 2016, 11:15:35 AM6/21/16
to Cukes
please tell me what versions i should use for all the jars.
that would help me a lot.

Thanks in advance

aslak hellesoy

unread,
Jun 21, 2016, 11:24:50 AM6/21/16
to Cucumber Users

--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vino Maddy

unread,
Jun 21, 2016, 12:12:32 PM6/21/16
to Cukes
thanks ashlok,

what version of java should i use

Justin Radcliffe

unread,
Jun 21, 2016, 12:48:29 PM6/21/16
to cu...@googlegroups.com
Use 1.2.4 for those 3 jars.

On Tue, Jun 21, 2016 at 12:12 PM, Vino Maddy <vinom...@gmail.com> wrote:
thanks ashlok,

what version of java should i use

--
You received this message because you are subscribed to a topic in the Google Groups "Cukes" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cukes/D24mCOfM1R8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cukes+un...@googlegroups.com.

aslak hellesoy

unread,
Jun 21, 2016, 1:37:18 PM6/21/16
to cu...@googlegroups.com
It's Aslak

Java 6, 7 or 8


On Tuesday, 21 June 2016, Vino Maddy <vinom...@gmail.com> wrote:
thanks ashlok,

what version of java should i use

--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.

Vino Maddy

unread,
Jun 22, 2016, 3:05:23 AM6/22/16
to Cukes
Thanks Justin and Aslak

Vino Maddy

unread,
Jun 22, 2016, 6:44:42 AM6/22/16
to Cukes
I upgraded the jars to latest version and this is how it looks now.

junit - 4.11
cucumber - core - 1.2.4
httpclinet - 4.3.3
cucumber-junit - 1.2.4
selenium-java - 2.41.0
commons- configuration - 1.10
cucumber-java - 1.2.4

but now i am getting the below error:

Feature: APM login
Started InternetExplorerDriver server (32-bit)
2.53.0.0
Listening on port 44796
Only local connections are allowed

  @smoke
  Scenario: Login to APM with valid user name and password                             [90m# src/test/resources/Test.feature:4 [0m
    [32mGiven [0m [32mI go to " [0m [32m [1mLoginPage.url [0m [32m" URL [0m                                                   [90m# StepImplementation.i_go_to_URL(String) [0m
    [31mAnd [0m [31mI enter " [0m [31m [1madmin [0m [31m" into " [0m [31m [1mLoginPage.username [0m [31m" text field [0m                           [90m# StepImplementation.i_enter_value_into_textfield(String,String) [0m
      [31morg.openqa.selenium.NoSuchWindowException: Unable to find element on closed window (WARNING: The server did not provide any stacktrace information)
      Command duration or timeout: 12 milliseconds
      Build info: version: '2.41.0', revision: '3192d8a6c4449dc285928ba024779344f5423c58', time: '2014-03-27 11:29:39'
      System info: host: 'D9Z2DH92', ip: '10.67.33.42', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_79'
      Session ID: 3c887d77-b9ab-427e-b773-469c2209b568
      Driver info: org.openqa.selenium.ie.InternetExplorerDriver
      Capabilities [{platform=WINDOWS, javascriptEnabled=true, elementScrollBehavior=0, ignoreZoomSetting=false, enablePersistentHover=true, ie.ensureCleanSession=false, browserName=internet explorer, enableElementCacheCleanup=true, ie.enableFullPageScreenshot=true, unexpectedAlertBehaviour=dismiss, ie.fileUploadDialogTimeout=3000, ie.forceShellWindowsApi=false, pageLoadStrategy=normal, version=10, ignoreProtectedModeSettings=true, requireWindowFocus=false, initialBrowserUrl=http://localhost:44796/, ie.forceCreateProcessApi=false, nativeEvents=true, proxy={proxyType=}, browserAttachTimeout=0, ie.browserCommandLineSwitches=}]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
      at java.lang.reflect.Constructor.newInstance(Unknown Source)
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
      at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:348)
      at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:389)
      at org.openqa.selenium.By$ById.findElement(By.java:214)
      at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:340)
      at com.cucumbermaven.StepImplementation.getElement(StepImplementation.java:228)
      at com.cucumbermaven.StepImplementation.i_enter_value_into_textfield(StepImplementation.java:168)
      at ?.And I enter "admin" into "LoginPage.username" text field(src/test/resources/Test.feature:7)
      [0m
    [36mAnd [0m [36mI enter " [0m [36m [1madmin [0m [36m" into " [0m [36m [1mLoginPage.password [0m [36m" text field [0m                           [90m# StepImplementation.i_enter_value_into_textfield(String,String) [0m
    [36mWhen [0m [36mI click on " [0m [36m [1mLoginPage.logon [0m [36m" button [0m                                           [90m# StepImplementation.i_click_on_button(String) [0m
    [36mThen [0m [36mI wait for " [0m [36m [1m2 [0m [36m" seconds [0m                                                         [90m# StepImplementation.i_waits_for_given_seconds(String) [0m
    [36mAnd [0m [36mI should see " [0m [36m [1mSecurity [0m [36m" on the page [0m                                             [90m# StepImplementation.verify_text_matching(String) [0m
    [36mAnd [0m [36mThe page title should be " [0m [36m [1mHome - Origination Manager - Fair Isaac Corporation [0m [36m" [0m [90m# StepImplementation.verify_Title(String) [0m
    [36mThen [0m [36mclose browser window [0m                                                           [90m# StepImplementation.close_browser_window() [0m

[31mFailed scenarios: [0m
[31msrc/test/resources/Test.feature:4 [0m# Scenario: Login to APM with valid user name and password

1 Scenarios ( [31m1 failed [0m)
8 Steps ( [31m1 failed [0m, [36m6 skipped [0m, [32m1 passed [0m)
0m4.724s

org.openqa.selenium.NoSuchWindowException: Unable to find element on closed window (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 12 milliseconds
Build info: version: '2.41.0', revision: '3192d8a6c4449dc285928ba024779344f5423c58', time: '2014-03-27 11:29:39'
System info: host: 'D9Z2DH92', ip: '10.67.33.42', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_79'
Session ID: 3c887d77-b9ab-427e-b773-469c2209b568
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{platform=WINDOWS, javascriptEnabled=true, elementScrollBehavior=0, ignoreZoomSetting=false, enablePersistentHover=true, ie.ensureCleanSession=false, browserName=internet explorer, enableElementCacheCleanup=true, ie.enableFullPageScreenshot=true, unexpectedAlertBehaviour=dismiss, ie.fileUploadDialogTimeout=3000, ie.forceShellWindowsApi=false, pageLoadStrategy=normal, version=10, ignoreProtectedModeSettings=true, requireWindowFocus=false, initialBrowserUrl=http://localhost:44796/, ie.forceCreateProcessApi=false, nativeEvents=true, proxy={proxyType=}, browserAttachTimeout=0, ie.browserCommandLineSwitches=}]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:348)
at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:389)
at org.openqa.selenium.By$ById.findElement(By.java:214)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:340)
at com.cucumbermaven.StepImplementation.getElement(StepImplementation.java:228)
at com.cucumbermaven.StepImplementation.i_enter_value_into_textfield(StepImplementation.java:168)
at ?.And I enter "admin" into "LoginPage.username" text field(src/test/resources/Test.feature:7)

Please help me

Vino Maddy

unread,
Jun 22, 2016, 7:18:40 AM6/22/16
to Cukes
Thanks all for all your help. you really helped a to solve this.

i solved the not a file or directory by changing the file path .

Justin Radcliffe

unread,
Jun 22, 2016, 8:26:06 AM6/22/16
to Cukes
Great, no problem.

Robert

unread,
Jun 23, 2016, 3:55:35 PM6/23/16
to Cukes
That's a Selenium WebDriver exception and has nothing to do with Cucumber.   
Reply all
Reply to author
Forward
0 new messages