Skip to Content
0

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

Dec 09, 2016 at 07:08 PM

335

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Alexandre SABATIER Dec 09, 2016 at 08:26 PM
0

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/

Share
10 |10000 characters needed characters left characters exceeded
Ajay Hoskote Somashekar
Dec 10, 2016 at 07:39 AM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Ajay

Check out my blog post on this matter:

https://blogs.sap.com/2014/10/22/cbta-using-dynamic-date-parameter-input-solman/

It explains why the VB code can be a good idea compared to &DATE variable for example.

Best regards

Tom

0
Ajay Hoskote Somashekar
Dec 12, 2016 at 03:57 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Aug 14, 2017 at 11:37 AM
0

Hi Aj,

Did you get any solution for this regard.

Regards,

Naveen

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Aug 21, 2017 at 08:34 AM
0

Hi Ajay,

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

Regards,

PB

Share
10 |10000 characters needed characters left characters exceeded