1

I am using a csv file which has got one column email and its value contains @ And when I try that value to read in my feature I am getting exception. Both Feature file and csv are in same location in project directory.

Csv:

username,password sample@yopmail.com,abc123 sample2@yopmail.com,abc123

My Feature looks like this:

NOTE that to make it work, I have appended @yopmail.com BUT this can't be done if my email id is @gmail.com or @mailinator.com or any other email.

Feature: Login Feature

Background:

  • url url

Scenario Outline: Login with Valid credentials

Given path '/oauth/token'
When header Authorization = applicationToken
And header Content-Type = 'application/x-www-form-urlencoded'
And form field grant_type = 'password'
And form field username = '<username>@yopmail.com'
And form field password = '<password>'
And method post
Then status 200
def accessToken = "Bearer "+response.access_token
print accessToken

Manish Arya
  • 113
  • 1
  • 7
  • maybe this is a special character for csv (which you have to escape) or maybe there is a bug in karate. if you can't figure this out, try switching to JSON. else please contribute code or follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue – Peter Thomas May 21 '21 at 10:35

0 Answers0