Java Script extension tool

sendmenicedealssendmenicedeals Posts: 12
edited June 4 in SOAtest

Hi,
i am new to parasoft scripting, when i am trying to create java script using extension tool using below command

<head>
  <script type="text/javascript" src="https://www.google.net?id=01&product=something"></script>
</head>

i am getting evaluate error like this :2:0 Expected an operand but found <, , ^ in at line number 2 at column number 0. i tried both option in parasoft java script (oracle nashorn) and java script (legacy).

can any one help me on this issue. thanks in advance

Comments

  • jakubiakjakubiak Posts: 664 admin

    You are putting HTML code into a JavaScript editor, which is why that won't work. I assume you are trying to call some code that is in the JavaScript link? If so, save that code into a local JavaScript file, and then in your Extension Tool chose the File option and select the local file. In the Method dropdown you can choose the method from the file you want the tool to call.

  • sendmenicedealssendmenicedeals Posts: 12
    edited June 5
    <head>
      <script type="text/javascript" src="https://www.google.net/bt/tags.js?id=01&product=something"></script>
    </head>
    

    thank you for your reply. yes your are right, I saved above code in the file "sample.js" and i am trying to call method dropdown as Javascript, but i am still getting the same error. Can you please help me with this. How can I save the above code and call

  • jakubiakjakubiak Posts: 664 admin

    You are still saving HTML contents into a JavaScript file, which you cannot do. You need to save the contents of "https://www.google.net/bt/tags.js?id=01&product=something" into the JavaScript file instead.

  • sendmenicedealssendmenicedeals Posts: 12

    thank you

  • sendmenicedealssendmenicedeals Posts: 12

    thank you it worked!!!

Sign In or Register to comment.