Skip to Content

CBTA Test Automation - Current date value to i/p parameter & dynamic parameter value in the URI

Hello All,

I am currently using CBTA to perform Test Automation of SAPGUI transaction and i have 2 queries:

Query 1:
I need to pass current date to the variable how do i pass the current date
I tried passing %today% to an input parameter and it did not work

Query 2:
,
I have to find a specific entry within the table and double click on it.
I used CBTA_GUI_TC_FINDROW component to find the row number, now i need to pass the row number as a dynamic variable into the uri of
another component for double clicking replacing static row number. Please let me know the syntax to do so

Thanks,
Aj

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Dec 09, 2016 at 08:26 PM

    Hello,

    1) You can use VB code for pretty much anything.

    Today's date in CBTA would be: %=day(now())&"."&month(now())+1&"."&year(now())%

    or... %=day(DateAdd(“m”,1,now()))&”.”&month(DateAdd(“m”,1,now()))&”.”&year(DateAdd(“m”,1,now()))%

    2) Check the component CBTA_A_SETINEXECUTIONCTXT to store the value during the runtime and pass it to another script. This link should be helpful: https://blogs.sap.com/2014/10/10/how-to-use-string-functions-in-cbta/

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 10, 2016 at 07:39 AM

    Hello Alexandre,

    Thanks for the reply, plz find my response below:

    1. Is there simpler means than writing custom code - VB code, i just need to pass the value of current date to Variable. In eCATT we had special variable &DATE which will take current date. Do we have something like this

    2. I had a look into the link, i need to change only part of the uri which mentions row number and not the entire uri

    EG:

    label=Element Details; type=GuiButton; id=wnd[0]/usr/subINCLUDE1XX:SAPMM61R:0750/tblSAPMM61RTC_EZ/btnMDEZ-DETAIL_ICON[0,17]

    Here i only need to replace column 17 in [0,17] with the variable

    Thanks,

    Aj

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 12, 2016 at 03:57 PM

    Thanks Tom for the response.

    Please also letme know how do we make a number in the uri to variable which dynamically changes

    Thanks,

    Aj

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 14, 2017 at 11:37 AM

    Hi Aj,

    Did you get any solution for this regard.

    Regards,

    Naveen

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2017 at 08:34 AM

    Hi Ajay,

    Both, eCATT system variable "&DATE" as well as the new CBTA system variable "%today% " works in the CBTA script.

    Regards,

    PB

    Add comment
    10|10000 characters needed characters exceeded