As you know SAP CBTA is script less automation testing tool and it is required lot of CBASE understanding in order to work with custom coding.
Without touching backend code, below option reveals us how we can pass current date value during the script execution.
Below are the steps to follow:
Example:
I have to enter 2 days advance date
%=Day(Date+2)%.%=Month(Date)%.%=Year(Date)%
I have to enter 1 month advance date
%=Day(Date)%.%=Month(Date+1)%.%=Year(Date)%
I have to enter 1 year previous date
%=Day(Date)%.%=Month(Date)%.%=Year(Date-1)%
Without touching backend code, below option reveals us how we can pass current date value during the script execution.
Below are the steps to follow:
- Open the recorded CBTA Script
- Edit the date it captured
- Replace hard code date value with %=day(now())&"."&month(now())&"."&year(now())%
- Save it and run the script
Example:
I have to enter 2 days advance date
%=Day(Date+2)%.%=Month(Date)%.%=Year(Date)%
I have to enter 1 month advance date
%=Day(Date)%.%=Month(Date+1)%.%=Year(Date)%
I have to enter 1 year previous date
%=Day(Date)%.%=Month(Date)%.%=Year(Date-1)%
Hi!
ReplyDeleteThis is expression tells me the today date like this 20.1.2022.
How can i change the expression to make the date like this 20.01.2022?
thanks in advance.