Connect text input box with the workflow after click the guess button

i don’t know how to connect and receive input from web app page. let say as attached picture. i want to make that, the user can input 5 times before game over message. or if it guess correctly within 5 times, it will tell Congrats. and there is play again button to reset again.

i can understand the flow is initilizing: answer, tries, gamewon false, gameover false. loop to check if user_input match the answer.

but actually how to take the user_input from the mainpage to this workflow? i lost there. thank you

  • You can use Get Text activity to read “What is 3 + 7 ?” as a String.
  • Then you have to extract 3 and 7 separately convert it to Integer. (Use Regex i.e. (\d+)\s*([\+\-\*/])\s*(\d+))
  • Identify the operation +, _ ( use switch case here)
  • Calculate the equation.
  • Use type into to type the answer into the textbox.

If your questions are always going to be in a specific order- i.e: if the first question is always 3+7, the second question is 3+5 etc, just use Get Text activity to read the value in the answer box. You can also start your process by using the “Application Event Trigger” where the process starts reading the value once the “Submit” button is clicked.

@caddy_niash

First thing is this a web page or is it a form that you are creating?

If wepage then you need to rely on the reply that the webpage gives when clikced that is to read the message wrong or right and process accordingly..as you dont know ehen the click happens you need to use a while loop with get text constantly and check if it has won or failed text in it and proceed accordingly

If its your own form then use only type and on clikc events to get the data

Cheers