Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Action

Parameters

Example Usage

setDateFormat

Web, Mobile


To change the current date format of the application.

Useful if user wants to use available actions of date with different date format.

Param 1 : Valid date format

Example:

setDateFormat : <Valid date format : dd,MM,yyyy>

Sets the date format to dd,MM,yyyy

Suppose you wishe to use the current date in the date format dd,MM,yyyy. All you need to do is, use the keyword setDateformat to set the date format to dd,MM,yyyy & then use keyword copycurrentDateTo to store the current date in a variable of your choice. The current date will be stored in the mentioned date format dd,MM,yyyy. Use the date stored in variable with appropriate keyword.

setDateTimeFormat

Web, Mobile


To change the current date-time format of the application.

Useful if user wants to use available actions of date-time with different date-time format.

Param 1 : Valid date-time format

Example:

setDateTimeFormat : <Valid date-time format : dd/MM/yyyy::HH:mm:SS>

Sets the date-time format to dd/MM/yyyy::HH:mm:SS

Suppose you wishe to use the current date-time in the date-time format dd/MM/yyyy::HH:mm:SS. All you need to do is, use the keyword setDateTimeformat to set the date-time format to dd/MM/yyyy::HH:mm:SS & then use keyword copycurrentDateTimeTo to store the current date-time in a variable of your choice. The current date-time will be stored in the mentioned date-time format dd/MM/yyyy::HH:mm:SS. Use the date-time stored in variable with appropriate keyword.

restoreDefaultDateFormat

Web


To restore default date format defined in application configuration settings.

Example:

restoreDefaultDateFormat

Restores the default date format mentioned in configuration settings.

If you wish to use a certain date format only for a particular field and default format for the rest of the test case. Use the keyword setDateFormat for that field & then use restoreDefaultDateFormat later in the test case.

restoreDefaultDateTimeFormat

Web


To restore default date-time format defined in application configuration settings.

Example:

restoreDefaultDateTimeFormat

Restores the default date-time format mentioned in configuration settings.

If you wish to use a certain date-time format only for a particular field and default format for the rest of the test case. Use the keyword setDateTimeFormat for that field & then use restoreDefaultDateTimeFormat later in the test case.

addDaysToDateAndStore

Web


To add number of days to current date and store resultant for future use.

Param 1 : Number of days to be added to the date
Param 2 : Variable name to store the new date
Param 3 (optional) : Date to add the days to

Enter the date in the format mentioned in Date Format set under Application configuration (default / user defined).

Example:

addDaysToDateAndStore : <Number of Days : 5> <In Variable : bqVariable> <Date : >

Adds 5 days to current date (if date not mentioned in param 3) and stores into bqVariable

addDaysToDateAndStore : <Number of Days : 5> <In Variable : bqVariable> <Date : 04/01/20>

Adds 5 days to mentioned date 04/01/20 and stores into bqVariable

addMonthToDateAndStore

Web


To add number of months to current date and store resultant for future use.

Param 1 : Number of months to be added to the date
Param 2 : Variable name to store the new date
Param 3 (optional) : Date to add the months to

Example:

addMonthToDateAndStore : <Number of Months: 5> <In Variable : bqVariable> <Date : 04/01/20>

Adds 5 months to current date (if date not mentioned in param 3) and stores into bqVariable

addMonthToDateAndStore : <Number of Months : 5> <In Variable : bqVariable> <Date : 04/01/20>

Adds 5 months to mentioned date 04/01/20 and stores into bqVariable

addYearToDateAndStore

Web


To add number of years to current date and store resultant for future use.

Param 1 : Number of years to be added to the date
Param 2 : Variable name to store the new date
Param 3 (optional) : Date to add the years to

Example:

addYearToDateAndStore : <Number of Years : 1> <In Variable : bqVariable> <Date : 04/01/20>

Adds 1 year to current date (if date not mentioned in param 3) and stores into bqVariable

addYearToDateAndStore : <Number of Years : 1> <In Variable : bqVariable> <Date : 04/01/20>

Adds 1 year to mentioned date 04/01/20 and stores into bqVariable

copyCurrentDateTo

Web


Example:

copyCurrentDateTimeTo

Web


Example:

copyElementValueAsDateTime

Web


Example:

  • No labels