How to wait until an element is clickable, before the robot clicks on it?

sap
studio

#1

In my company’s web SAP app, there is a button which is faded/not clickable until it finishes loading, then it becomes clickable. However, the UiPath simply “clicks” on the button since the element is present, regardless of whether it is actually clickable.

How can I make the robot wait until an element is clickable, then perform the click? I want to avoid using the Timeout function.

Thank you all!


#2

you can check this thread

Regards…!!
Aksh


#3

Out of curiosity, WaitForReady = Complete doesn’t work in SAP?


#4

Hi vvaidya
The WaitForReady doesn not work :frowning: Even if I have specified WaitForReady Complete, the robot still clicks the SAP button before it is clickable.

Hi Aksh
The attribute method sort of works, but intermittently.
So it turns out when the button is not clickable, its parentclass attribute has a value of “urSTC urST3TD”; when it is clickable, the attribute has a value of “urSTC urST3TD urCursorClickable”.

What I have done, and I know it is correct since it works intermittently, is:

  1. Drag/drop a Do/While loop
  2. Inside of the loop, put a Get Attribute activity for the parentclass attribute. Save the output as buttonAttributte
  3. In the condition, set buttonAttribute = “urSTC urST3TD”

Basically what it does, is continuously getting the button’s attribute while the button is still not clickable, i.e. leave the loop when the button is clickable

It has worked intermittently. However, sometimes I would get an error for the Get Attribute activity: “Error HRESULT E_FAIL has been returned from a call to a COM component.”; exception type: ElementOperationException

Would anyone have any thoughts?

Thank you!


Error HRESULT E_FAIL has been returned from a call to a COM component
#5

hi can you share code for the above explanation which you told…

please


#6

Hi~
rahinafirdosh

In the way that Matthew CYLau suggested, we used the Do While statement to wait for the button to become active and then click to activate it.

We will load the image here.

It helped me a lot.
Thank you, Matthew CYLau.

`

      • List item

`