Page 1 of 1

Without Recording , click on element

Posted: Wed Dec 28, 2016 12:51 pm
by sawaiabhishek
Hi There,

I would like to click on element with its xpath , but without recording it.

Can someone please suggest the flow to achieve this ?

Re: Without Recording , click on element

Posted: Wed Dec 28, 2016 8:27 pm
by N612
Hello,

Do you mean RanorexPath (RxPath) or Xpath? They are very similar, but are different. You will need the RxPath in order to perform the below.

When recording, you are automatically adding each element you interact with to a repository, then performing an action on that repository element. If you wish to do this manually, you will need to do so in a code module.

See below for an example of clicking on the windows start button. First, create the element, then perform the action you wish on that element.

Code: Select all

Button myButton = Host.Local.FindSingle("//button[@accessiblename='Start']");
myButton.Click();
I hope this helps!