Forum Discussion

william_roe's avatar
william_roe
Super Contributor
9 years ago

Passing Code Expression as Parameter Value in Keyword Test

Give this a Kudo if you would also find this useful.

5 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    See if something like this will work for you.  (attachments)

    • william_roe's avatar
      william_roe
      Super Contributor

      That would work but it would be cleaner if a date could be passed as a code expression.

       

      Thanks.

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        You can have three project variables

        Daily

        Weekly

        Monthly

         

        and also

        DayCalc with default = your aqDateTime.AddDays

        MonthCalc with default  = your aqDateTime.AddMonths

         

        at the top of your tests, set the Daily, Weekly, Monthly variables to the eval(DayCalc) or eval(MonthCalc) and then use those variables for the parameters