Get a property at runtime?

Oct 12, 2012 at 12:21 PM

Hi,

I am currently using the latest version of CUITe and have created some objects using the framework. I have a CUITe_HtmlImageobject with a property of AbsolutePath.

Is there a way at runtime to retrieve other properties of the htmlimage e.g. LinkAbsolutePath?

Thanks

Coordinator
Oct 13, 2012 at 2:27 AM

You can call the UnWrap() method to get to the underlying UITestControl.

 

CUITe_HtmlImage img = Get<CUITe_HtmlImage>("id=img1");

string lnkAbsPath = img.UnWrap().LinkAbsolutePath;

 

Oct 15, 2012 at 11:54 AM

Thanks worked great.

Only problem now is that it is getting the HTML ASCII coding e.g. %20. Need to find/create a parser that will convert it back....

Coordinator
Oct 15, 2012 at 10:27 PM

I recommend using the HtmlEncode and HtmlDecode methods of the System.Web.HttpUtility class.

http://msdn.microsoft.com/en-us/library/73z22y6h%28v=vs.100%29.aspx

Oct 16, 2012 at 10:33 AM

Thanks again icnopop!

You have been really helpful and quick to reply!