Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

149
Views
Unable to execute karate script() method

I am trying to migrate one of selenium test to karate, while doing this I am using script() method defined in documentation which is used in karate for evaluating the given string as JavaScript within the browser but I am getting this

enter image description here

driver.executeScript("sauce:job-result=passed");

Also Sharing my feature file which getting failed:

enter image description here

Also Even I tried calling below statement in my script but still getting the same error

* script("console.log('hello world')")

I am using testImplementation("com.intuit.karate:karate-core:1.2.0.RC1") version with gatling

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

First - try version 1.2.0.RC6 that has some fixes for the console.log() issue.

I also must say that sauce:job-result=passed does not look like valid JavaScript to me. Please take some time to read the docs: https://github.com/karatelabs/karate/tree/master/karate-core#karate-vs-the-browser

If still stuck, follow this process. That is the only way to replicate and for us to determine what fixes we need to make (if any): https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue

See this answer for ideas on how to troubleshoot things at your end: https://stackoverflow.com/a/71952132/143475

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!