Questions tagged [karate-call-single]
26 questions
1
vote
0 answers
How to update specific download path in chrome in karate framework
While executing our automation script in remote few file validation scenarios are breaking due download location keep changing. So I would like create a folder in C and set default download path for chrome like in selenium. How to implement the same…

Prasad Kona
- 31
- 1
1
vote
1 answer
How to write switch statement in Karate Framework
How to add switch statement in feature file?
I need to verify around 20 web tables data with database. for this I'm writing one common scenario which will work for all the web tables based on the condition.
Is there any possible like below in karate…

KrishnaKotha
- 13
- 4
1
vote
0 answers
Karate UI tests are Failing in Jenkins Pipeline
There are 2 issues:
Default Chrome Browser is NOT working in LOCAL for karate UI tests (Safari is working fine)
Karate UI tests are failing with the below errors:
SEVERE: command error: [/usr/bin/google-chrome, --remote-debugging-port=9222,…

Shreyash Choppawar
- 11
- 2
1
vote
0 answers
Configure multiple base url's in Karate
I have run a test case against multiple servers, ie Dev, QA, and STAGING. How can I configure all the URLs in the Karate configuration?
These server names are passed to Karate from the command line, using -D option

Ramath
- 158
- 3
- 11
1
vote
1 answer
karate.callSingle getting call twice for two tests
I am trying to integrate karate in my project for integration testing. I was trying to use karate.callSingle() to fetch authorization headers.
I have two tests
@Test
void test1() {
Results results =…

Ashu
- 77
- 5
0
votes
1 answer
How to extract a variable's value in feature file that was set during an endpoint call to java service using Karate automation?
Have a variable 'dummyVariable' in a function of MyService.java file. Now I am calling an endpoint 'dummyEndpoint' that sets the value of 'dummyVariable' to true or false.
I want to extract this value of 'dummyVariable' after I call 'dummyEndpoint'…

Manu Chittora
- 9
- 2
0
votes
0 answers
Is their any way to pass the api client id and secrets as parameter to karate config.js file
I have been using karate framework to run the automation test via and project is being saved to GitHub
Since the api client id and secret is being stored directly in karate config.js directly, which was not adviced
Now we are planning to change the…

hamsa raj
- 39
- 1
- 5
0
votes
0 answers
Using an access token until it expires and then getting a fresh one during parallel execution in Karate
I have hundreds of tests which need to have an access token (from a "token service"), which expires after every 15 mins. Instead of making a call to get a fresh token every time, I tried using karate.callSingle() functionality to cache the access…

underdoggo03
- 23
- 3
0
votes
1 answer
How to get row data from web table in Karate framework
The web table has a combination of textbox, span and checkboxes. I need to get first row of all the data in single def and have to verify with DB in order wise.
Ex: First row of table has columns like below.
OrderID(span), EmpName(input),…

KrishnaKotha
- 13
- 4
-5
votes
1 answer
IF condition is getting failed ..solution plz
eval if (success == 'Data1') karate.call('test.feature')
this is getting failed displaying error message as
Expected ; but found { }
Tried below :
eval if (success == 'Data1') karate.call('test.feature');

Shilpa S
- 1