Loop Activities

Hello everyone, I would like to extract some data from the website and record the highest value for three minutes. I would like to ask how can I use if…else activity to keep updating the data extracted (as the highest value will keep changing) for three minutes.

Hi

Hope the below steps would help you resolve this

  • Go to the website where you want to extract the data from.
  • Use the Get Text activity to extract the data that you want to track and save it in a string variable
  • use a assign activity and mention as

Counter = 0

Where counter is a variable of type int32

  • then use a WHILE LOOP and mention the condition as counter < 10

I just mentioned 10
U can mention as per your need on repeating the validation

  • now inside that while loop Use the If…Else activity to compare the extracted value to the highest value.

  • If the extracted value is greater than the highest value, update the highest value to the same string variable.

  • use a delay activity with timing seconds mentioned as per the wait time u want

  • then an assign to increment the counter
    Counter = counter + 1

This will now repeat for 10 times (can change as per need) and update the value if anything changed with delay timer

Cheers @CHAN_Hiu_Fung_Victor_Stud

You can use a combination of activities, including the “Do While” loop, “Get Text” activity, and variables to track the highest value. Here’s the steps.

1.Initialize Variables

  • highestValue = 0
    - startTime = Current Time

2.Take While loop (Condition: Check if the time elapsed is less than three minutes)
inside the loop take Get Text activtiy (to extract the current value from the website)
Assign ( value to currentValue)

*If

  • Then
    (currentValue > highestValue)
    LHS RHS

    • Assign (highestValue = currentValue)

    -Assign (startTime = Current Time)

End Do While’

it will check the until three mints and you will get the highest value for three mints

@CHAN_Hiu_Fung_Victor_Stud

Sorry, but I would like to ask how to set the time in variable.

You need to loop three mints right so you can add like this
varaible type = “DateTime”

@CHAN_Hiu_Fung_Victor_Stud

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.