karate icon indicating copy to clipboard operation
karate copied to clipboard

JavaScript functions cannot access global vars after executing feature in nested context

Open rwong-gw opened this issue 4 months ago • 1 comments

If I am running a Karate feature, which calls a Java method, which then executes another Karate feature, something about that nested call to Karate seems to disrupt something in its JavaScript environment, such that JavaScript functions can no longer see global vars.

Attached is a zip file with a test (KarateJsGlobalTest.java) that reproduces the issue.

karate-javascript-global-var-bug.zip

rwong-gw avatar Feb 09 '24 00:02 rwong-gw