Delay time Variable

uiautomation

#1

can we set the delay time using variable in delay activity.
I have delay time in string variable how to set that variable to the delay time duration property.


#2

Hi,
yes .
Create a VarDelay of type system.timespan="";
then pass in the delay property.
Reference

PS: just make sure the format of string.


#3

I have delay time in .csv sheet .
get the value using this code dtconfig.rows(0).item(0).tostring and assigned to string variable.
if I pass the variable to delay activity I am getting error .
Can you please tell me how to do this?


#4

Hi,
You need to convert string to timespan.
Use TimeSpan.Parse(str) to convert to the string.
Reference


#5

Thank you its working .


#6

Hello ddpadil
I definitely learned a variable delay duration.
Thank you!!!:+1: