This project is read-only.

Using custom HTML data attributes as search parameters

Apr 9, 2014 at 5: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 5: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 8: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 9:37 PM
If you can provide a code snippet, i'd be glad to give it a go.
Apr 15, 2014 at 12:23 AM
Edited Apr 15, 2014 at 12:24 AM
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 5:17 PM
Edited May 6, 2014 at 5: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