mcdcorp / opentest

Open source test automation tool for web applications, mobile apps and APIs
https://getopentest.org
MIT License
446 stars 107 forks source link

Error Trying make a http request #621

Closed chrissramos closed 1 year ago

chrissramos commented 1 year ago

hi! i would like to make a http request, systemA has the endpoint and token has the bearer token, so i have the org.getopentest.base.ScriptAction error i think the problen could be in the library let httpClient = new open.dal.http.HttpClient();

how can i solve this error?

thank you!

description: Parsear el response de las peticiones rest o soap dataSet: $data("input-test/SuiteTestParser") actors:

adrianth commented 1 year ago

The keyword let is not available, since OpenTest supports the JavaScript syntax up to ES5. So that's definitely going to generate an error. Use var instead for defining variables.

The other thing I'm seeing is the use of the open.dal.http.HttpClient class. I'm not sure if you imported it previously in your test, but if you didn't that's also going to be a problem, since that class is not part of the core OpenTest. Where is the open.dal.http.HttpClient class coming from? Did you implement it in Java and are importing it from a JAR file? Is it defined in JavaScript someplace else in your test?