In my example below I want to validate " Then the user is validated"
Here within my .groovy file the “then” will only have a WebUI.callTestCase(findTestCase() keyword to look at a test call “user land on home page”
Within the “user land on home page” test case I want to input a “if condition” which pulls the “loginResult” variables from the .feature file.
if valid look make sure these object are here
elseif invalid make sure these object are here
However when I try to write the test case script , I don’t know if test cases can call variables with .feature files.
if so how to do that , if now I can do a work around in the .groovy.
Scenario Outline: User Login with a valid email
Given user is on login screen
And user enters their credentials
| emailAddress | password |
| | |
When the user taps the login button
Then the user is validated
| loginResult |
| |
Examples: Actice Fan
| emailAddress | password | loginResult |
| valid@gmail.com | Test123 | valid |
Examples: Inactive fan
| emailAddress | password | loginResult |
| invalid@gmail.com | Test123 | invalid |