Visible, Enabled and Valid returning incorrect values : Automation API

Visible, Enabled and Valid returning incorrect values

Class library usage, coding and language questions.

Visible, Enabled and Valid returning incorrect values

Postby jlowder » Thu Jan 19, 2012 6:30 pm

I have a .Net application that I'm working on and when selecting certain drop down values I'm trying to make sure that a group of "refund address" text boxes and combo boxes do not appear in the GUI.

If I execute:

Code: Select all
Ranorex.Text address1;
var addressExists = Host.Local.TryFindSingle("/form[@controlname='MainForm']/element/form[@controlname='PaymentEntry']/container[@controlname='grpAddress']/text[@controlname='txtRefAddr_Line1']/text[@accessiblename='txtRefAddr_Line1']", out address1);
                //Assert.That(address1.Visible, Is.False);
                var blah = address1.Visible;
                var blah2 = address1.Enabled;
                var blah3 = address1.Valid;


blah, blah2 and blah3 all return true even though the objects are not visible in the GUI. I can see maybe Valid returning true if the objects are there, just not displayed, but enabled and visible should return false.

Is there another way I can try to determine that these objects aren't visible?

Thanks,

Jason
jlowder
 
Posts: 55
Joined: Wed Dec 30, 2009 3:56 pm

Re: Visible, Enabled and Valid returning incorrect values

Postby jlowder » Thu Jan 19, 2012 8:51 pm

I found an external container that held these objects which was being turned on/off. I'm just accessing this one instead.
jlowder
 
Posts: 55
Joined: Wed Dec 30, 2009 3:56 pm

Re: Visible, Enabled and Valid returning incorrect values

Postby Support Team » Fri Jan 20, 2012 11:43 am

Hi,

Sometimes there are controls which exist out of more components, during recording (you have to Enable Hotkeys first) or spying you can use the "Roll Mouse Wheel" to change the level of UI element selection.

Regards,
Markus
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests

cron