For left click, we have object.click(); Need the similar logic for Right click operation.
Appreciate your help on this.
You can edit the TruClient Click step to Trigger a different button.
To do this, go into the Arguments section and change the Button value.
You can also set click modifiers (Shift, Ctrl or Alt).
Thanks for update.
But my question is about not to use general click and updating arguments.
Using "Evaluate JS on object", what is the command to pass in the argument to emulate right click operation.
Evaluate JS step performs a standard JS script on the browser object.
object.click() is not a TruClient API, but rather a JS function.
Similarly, there is not built-in TruClient API for right clicks.
You can try to find the JS way to do it on Google. Something like this (just to clarify, I did not test it).
Thank you for update.
Yeah, I am pretty much looking for "JS function" to do "right click". I tried with "object.contextmenu()", but didn't work out.
To give a headsup, we have multiple buttons which will be selected randomly. "Left click" on it has one operation and "right click" has another. For left click, I am using "Object.click()" JS function without any issues. Currently am looking for JS function which performs right click in Truclient protocol. Tried multiple ways but couldn't succeed.
Let me know if any details required.
Thanks for the clarification.
I realize this is not what you asked, but you can implement such a logic quite easily with TruClient steps.
Use a random number and If steps to create a flow that performs different clicks.
See this screenshot:
Thank you Edo.
Now we are getting closure on the need. In the below details you shared, can we replace the highlighted with "Evaluate JS on object" function to perform the same operation
Below is the one I am using for left click. Looking for the JS logic/function to perform right click.
You should replace the code with a code that triggers right click on an element. The element in your case is the object.