EnsureVisible and Click not working

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Posts: 34
Joined: Fri Sep 14, 2012 11:05 am

EnsureVisible and Click not working

Post by puntapret » Wed Sep 19, 2012 4:29 pm


My environment :
Windows XP Pro SP 3 French Edition
.NET Framework 3.5 SP 1

I have a modal popup page to edit an article, in this popup page, i have a div that is decorated like a select tag, and inside the div, i have some other div and deep down, i will have a radiobutton and a label to choose.

I use user code in the recording module to loop through the div and find a specific label, and then select the radiobutton, and click it.

My code

Code: Select all

// click button to open the div

// ensure visible the div
// move the mouse to the div 
            Mouse.MoveTo(repo.AssortimentFO.div_Contenance, Location.Center);
// looping through all div, 
            LabelTag lbl = null;
            foreach (DivTag di in repo.AssortimentFO.div_Contenance.Find("div"))
                if (di.TryFindSingle("label[@innertext='" + repo.ContenanceText + "']", out lbl)){
                    InputTag input = lbl.Parent.FindSingle("input");
                    if (input != null) {
                        Mouse.MoveTo(input, Location.Center);

The problem is, the label and radiobutton (input) are found, but it seems that it didn't get clicked.

Any ideas what's wrong ? i also already created a snapshot of my page, but i don't know where to send it.

Thanks in advance

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

Re: EnsureVisible and Click not working

Post by Support Team » Thu Sep 20, 2012 3:52 pm


Which browser do you use? Does it work if you use another browser?
I sent you an e-mail with the server credentials for our ftp server. You can upload your Ranorex Snapshot there. Please write an e-mail to [email protected] if the upload is completed. Tell us the name of the file which was updated.

Ranorex Support Team

Posts: 34
Joined: Fri Sep 14, 2012 11:05 am

Re: EnsureVisible and Click not working

Post by puntapret » Tue Oct 09, 2012 9:01 am

Just for information, after updating to the latest version, my problem is no longer there