Page 1 of 1

EnsureVisible and Click not working

Posted: Wed Sep 19, 2012 4:29 pm
by puntapret
Hi,

My environment :
Ranorex 3.0.5.13548
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
            repo.AssortimentFO.btn_Contenance.Click();

// ensure visible the div
            repo.AssortimentFO.div_Contenance.EnsureVisible();
            
// 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)){
                    lbl.Parent.EnsureVisible();
                    
                    InputTag input = lbl.Parent.FindSingle("input");
                    
                    if (input != null) {
                        input.EnsureVisible();
                        Mouse.MoveTo(input, Location.Center);
                        input.Click();
                    }
                    break;
                }
            }

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

Re: EnsureVisible and Click not working

Posted: Thu Sep 20, 2012 3:52 pm
by Support Team
Hello,

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.

Regards
Bernhard
Ranorex Support Team

Re: EnsureVisible and Click not working

Posted: Tue Oct 09, 2012 9:01 am
by puntapret
Just for information, after updating to the latest version, my problem is no longer there