Scenario Outline with Example issue

60 views
Skip to first unread message

Sanjay Sharma

unread,
May 24, 2017, 12:07:50 PM5/24/17
to Cukes
Hi All,

I am automating my andorid app using cucumber+maven+appium.

My Feature file include this

   Scenario Outline: login
    When enter "<username>" and "<password>"
    And click login
    
    Examples: 
    | username               | password |
    | ersanjay....@gmail.com | 123456 |
      | a...@c.com | 123456 |


But when I am running always first data that is ersanjay....@gmail.com is getting executed not the 2nd data.

Please have a look on error which i am getting in eclipse

org.openqa.selenium.NoSuchElementException: An element could not be located on the page using the given search parameters. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 30.14 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '3.4.0', revision: 'unknown', time: 'unknown'
System info: host: 'DESKTOP-60QTADU', ip: '192.168.8.99', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_111'
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities [{appPackage=com.boutiqaat.boutiqaat, appActivity=com.boutiqaat.boutiqaat.activity.HomeActivity, newCommandTimeout=0, platformVersion=7.0, automationName=uiautomator2, javascriptEnabled=true, platformName=Android, deviceName=ce061606a9264a1005, platform=ANY}]
Session ID: bb19a479-40b7-4693-8415-9fd2a071553f
*** Element info: {Using=id, value=com.boutiqaat.boutiqaat:id/editText_email}
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:215)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:167)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:671)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:410)
at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:62)
at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.findElement(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:453)
at io.appium.java_client.DefaultGenericMobileDriver.findElementById(DefaultGenericMobileDriver.java:70)
at io.appium.java_client.AppiumDriver.findElementById(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.findElementById(AndroidDriver.java:1)
at org.openqa.selenium.By$ById.findElement(By.java:218)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:402)
at io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:58)
at io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.findElement(AndroidDriver.java:1)
at cucumber.steps.StepClassTest.enter_and(StepClassTest.java:142)
at ?.When enter "a...@c.com" and "123456"(feature/Boutiqaat.feature:26)


Regards,'
Sanjay



Thomas Sundberg

unread,
May 24, 2017, 12:58:44 PM5/24/17
to Cukes
Hi!

This is not a Cucumber error. You have an issue with your application
and an element that can't be located.

If you run the example without connecting to the application, you will
be able to see that exach example will be exeucted.

Do you have an issue where your app is in a state you don't expect
when the second execution happens?

/Thomas
> --
> 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.



--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://www.thinkcode.se/blog
Twitter: @thomassundberg

Better software through faster feedback
Reply all
Reply to author
Forward
0 new messages