Hi everyone I have an issue I have a few instances where I have to click the OK button on oracle 1 time, 2 time or 3 times. Such has X company makes me hit okay 2 times, the Y company when its processing makes me hit OK 2 times, and Z company makes me hit OK 1 time. Is there any way I can put this in a for loop and do a element exists since the OK hot key is the same? Can anyone build out an example for me?
Fine
—We can try with Send hot key activity and use key as tab and use n number of activities with key tab until it reaches the field where we want to click
—Then Use this activity again with key enter and use two or three times with same key as enter based on the requirement
Hope this would help you
Cheers @seanp92
Might be able to Send hotkey using it inside if Activity! OR we can also use click activity inside IF Activity!!
Value from X or Y??
How are you checking the above condition?
Cheers
I was thinking what if I used a for each loop with the parameters set to 3 or less and then inside the for each I have a element exists and a hotkey that hits the OK button until there is not one left and then exits out of the loop.
Fine
i got ur point
we can use this method but with slight changes
instead of For Each loop we can use WHILE loop with condition we want like less than or greater a counter variable so that it would repeat the process till the value we specify reaches the counter may be like this counter < 3 where counter is a variable of type int32 with default value as 0 defined in the variable panel
–inside the loop use a elememt exists activity and get the output with a varaible of type boolean named bool_element
–now use a if condition like this
bool_element = True
if the condition passes it will go to THEN part where we can use a SEND HOT KEY ACTIVITY with key as enter
–at last in the THEN part use a assign activity to increment the counter variable
like this
counter = counter + 1
hope this would help you
Cheers @seanp92
having trouble creating this workflow anyway you can upload an example?
sure like this
Cheers @
Thanks I will give it a go
So when I do the condition Counter< 3 do i need to use an assign statement?
yah ofcourse inside the while loop atlast use a assign activity and mention like this
counter = counter + 1
this will increment the value of the counter - a int32 variable, so that the click will be executed until the condition fails in the while loop
Cheers @seanp92
For some reason it is still giving me an error message. Can you please upload the workflow instead of screen shot? Thanks!
sure here you go with a sample xaml
i tried to execute it with a sample process that will click on the refresh button three times in a browser
we can choose different element in your process based on the requirement
hope this would help you
kindly try this and let know for any queries or clarification
sean.zip (10.3 KB)
Cheers @seanp92