I have to create a loop for 4 hours where click activity will run after every 18 mins on chrome browser to continue the timer and it should be stopped once its reached 4 hours of total timer run

I have to create a loook for 4 hours where click activity will run after every 18 mins on chrome browser to continue the timer and it should be stopped once its reached 4 hours of total timer run

i know while loop will be working here but i am confused in variables which one to set up here so that it should loop back to chrome after 18 min to stop/start timer untill it complete 4 hours

Thanks in advance

@puneet_sharma1

Welcome to the community

Inside the loop use 18 minutes in delay activity an dperform clicks

And for total 4 houts use a variable to store the start time before the loop start starttime = Now and inside loop use condition DateDiff(DateInterval.Hours,Now,StartTime)>=4 then end the loop

Cheers

hi @puneet_sharma1

  1. Assign activity:
  • Variables:
    • startTime: DateTime.Now
    • currentTime: startTime
    • totalDuration: 240 (minutes)
  1. While activity (Condition: currentTime - startTime < totalDuration)
  • Click activity (perform your desired click activity on Chrome)
  • Delay activity (Duration: 18 minutes)
  • Assign activity:
    • currentTime: DateTime.Now
  1. (Optional) Add any additional actions after the loop is completed.

Hope it helps!!
Regards,

Hi @puneet_sharma1

Try this-

Assign totalTime = 0

While totalTime < (4 * 60 * 60,000)
Click activity to interact with Chrome browser

Delay 18 minutes (18 * 60,000 milliseconds)

Assign totalTime = totalTime + (18 * 60,000)

End While

Thanks!!

hi

Thank you for taking time to reply
what will be variable time here in totalduration
and assign activity is used twice ?

Hi

Thank you for taking out time and revert
can you explain a bit i am confused in assign total time and below assign activitiy

Hi
@Anil_G

Thank you for taking out time

i did not understand this one
can you check and explain it bit more

Thanks