Taking input from a mouse click

Ranorex Studio, Spy, Recorder, and Driver.
Posts: 1
Joined: Tue May 22, 2012 12:49 pm

Taking input from a mouse click

Post by sourav » Tue May 22, 2012 1:09 pm


I need to take input from a mouse click. For example I click on a label with caption '1111', and the caption keeps changing with the action I take. Is possible to store the caption in a variable so that I can validate the value? And depending on the value I have to pass or fail the recording.

The repository item is something like text[@caption='111']

Could you please help me with this?


User avatar
Support Team
Site Admin
Site Admin
Posts: 12174
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: Taking input from a mouse click

Post by Support Team » Thu May 24, 2012 3:47 pm


Yes, you should normally be able to save it.
Do you have tried to get it via the following code?
String caption = yourText.Caption;
Ranorex Support Team