Concat Now Time in YYYYMMDDHH with LastName keyword test field as one string value
I have this piece of code
# Obtain the current time
TimeValue=aqDateTime.Time() # Obtain the current date and time
NowValue=aqDateTime.Now() # Convert the returned date/time values to string values
StringTimeValue = aqConvert.DateTimeToStr(TimeValue)
StringNowValue = aqConvert.DateTimeToStr(NowValue) # Post the converted values to the log
Log.Message(“The time obtained from the Time routine is ” + StringTimeValue)
Log.Message(“The time obtained from the Now routine is ” + StringNowValue) # Convert the floating-point values to string values
VariantTimeValue = aqConvert.FloatToStr(TimeValue)
VariantNowValue = aqConvert.FloatToStr(NowValue) # Post the converted values to the log
Log.Message(“The variant representation of TimeValue is “+ VariantTimeValue)
Log.Message(“The variant representation of NowValue is “+ VariantNowValue)
I want to concat the The time obtained from the Now routine as YYYYMMDD and 24 hr format which the above does not look like. I dont need the PM. The name of the field to concat the time and date now function to is Aliases.browser.pageApplyNow6.formWouldYouLikeToIncludeA.textboxLastName
How can I achieve that in a unit script and when test executes the unit script fills out the LastName field with the entire string? I want to store that result also in a temporary variable that will be called again later in the test and reset when the start of the test begins the next time.
Thank You,
Todd