AnsweredAssumed Answered

how can i enter value dynamically while lisa is running a test?

Question asked by Maddalis on Dec 14, 2017
Latest reply on Jan 3, 2018 by wooda20

monika_mehtaDirkBleyenberg  roble04  - Guys would appreciate if you spare some time and commented on this thread.

 

-Regards,

Shashank

 

**************************************

 

Like if a service triggers an email with some kind of code which goes as input for next service?

I did introduce a delay for email to be triggered, which is happening and I have the code now, but how do i enter that as an input in form of pop up box which can be consumed by next service?

monikamehta4453146

#dynamic input

*********************UPDATE*****************

 

I am trying to run and use javascript in this context, to take a value from user. 

 

 

<html>
   <head>
      
      <script type="text/javascript">
         <!--
            function getValue(){
               var retVal = prompt("Enter your name : ", "your name here");
               document.write("You have entered : " + retVal);
            }
         //-->
      </script>
      
   </head>
   
   <body>
      <p>Click the following button to see the result: </p>
      
      <form>
         <input type="button" value="Click Me" onclick="getValue();" />
      </form>
      
   </body>
</html>
 

 

 

Ran into this error. Guessing that i have to download libraries or declare dependencies.

 

============================================================================ 
| Error in Script 
============================================================================ 
| Step:        Execute script (JSR-223) 
---------------------------------------------------------------------------- 
| Message:     ReferenceError: "window" is not defined in <eval> at line number 1


| Trapped Exception: ReferenceError: "window" is not defined in <eval> at line number 1 
| Trapped Message:   javax.script.ScriptException: ReferenceError: "window" is not defined in <eval> at line number 1 
---------------------------------------------------------------------------- 
STACK TRACE 
javax.script.ScriptException: ReferenceError: "window" is not defined in <eval> at line number 1 
        at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:467) 
        at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:451) 
        at jdk.nashorn.api.scripting.NashornScriptEngine.access$200(NashornScriptEngine.java:73) 
        at jdk.nashorn.api.scripting.NashornScriptEngine$3.eval(NashornScriptEngine.java:507) 
        at javax.script.CompiledScript.eval(CompiledScript.java:106) 
        at com.itko.lisa.test.ScriptExecHandler.executeCompiledScript(ScriptExecHandler.java:501)  

Outcomes