Using custom HTML data attributes as search parameters

Apr 9, 2014 at 4:03 PM
Hello everyone,

Is there a way to use HTML data attribute as a search property to find a control? Please let me know.

Apr 9, 2014 at 4:58 PM
xxxxx.GetProperty("data-my-key").ToString() should work, replace 'data-my-key' with whatever property you want.

I am not sure if you can use them in your Object Repository. I have just been using them in my methods to get dynamic objects.
Apr 10, 2014 at 7:30 PM
Thank you for your response SpaghettiCoder. Can you provide me with an example please? I am not sure, how to use it.
Apr 10, 2014 at 8:37 PM
If you can provide a code snippet, i'd be glad to give it a go.
Apr 14, 2014 at 11:23 PM
Edited Apr 14, 2014 at 11:24 PM
Seems like xxxxx.GetProperty("data-my-key") would get me the value of data-my-key attribute. But, I wish to use it as a search property. I was wondering that something like this:

public CUITe_HtmlComboBox comboBox = new CUITe_HtmlComboBox("data-my-key=auto");

would work in CUITe? Please let me know.

May 6, 2014 at 4:17 PM
Edited May 6, 2014 at 4:17 PM
Get a collection of objects (comboboxes in your example) & iterate through them.

Perform actions on only ones that have data-my-key == auto