Forum Discussion

ianlop's avatar
ianlop
Occasional Contributor
2 years ago

Script Routine Parameters

Hello,

 

I have written a parameterized script routine in python and I want to use it in a keyword test. But these parameters are an on-screen object's Property names and values.

The first parameter i have is 'PropNames' and the second one is 'PropValues'. Where they must accept the list format in python: ['A', B',....].

Which option would that be in the list below?

 

Thank you

 

  • Here's an example of using Code Expression to pass a list of strings, in a Run Script Routine keyword test

     

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Here's an example of using Code Expression to pass a list of strings, in a Run Script Routine keyword test

     

    • ianlop's avatar
      ianlop
      Occasional Contributor

      rraghvani wrote:

      Here's an example of using Code Expression to pass a list of strings, in a Run Script Routine keyword test

       


      Thank you

    • ianlop's avatar
      ianlop
      Occasional Contributor

      The documentation does not give an example on what I am looking for. I want to pass a list as an argument that my python method needs. Which of these options is that and how would I input that in?

       

      Here's an example on what I mean:

      def foo(LstParam1=[], LstParam2=[]):
              #code
              ////

      I can see that the only options would be Object Or Variant. Which one is it and how would I enter it in?

      Thank you