This is a migrated thread and some comments may be shown as answers.

Help requested with selecting a variable from an auto-complete drop-down list

1 Answer 81 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 27 Aug 2013, 03:28 PM

Hi, I’m wondering if there’s someone who could offer me some help on a small problem which I’ve been having.

My companies’ software uses an auto-complete feature on a lot of the fields where an option must be selected from the list to continue/populate information, example of which is below:



Now, depending on where I click on this drop down list the element added is either something like this:

 


 

And named ZyexStrongTag

 

Or something like this:

Named UiActiveMenuItemLink (where i've just clicked on the menu but not the company name)

 

The former will work fine enough for the company it’s intended for but I’m trying to write a more generic script that I can data bind to. However, I can’t data bind to a click action nor seem to find a way to re-target the element/action to just select any option that pops up on the auto-complete list as the element always seems bound to the text entered.

So i suppose what i'm asking is:

Is there a way to data bind to click actions? or;
How do i better target/identify my elements for these auto-complete drop-downs to be less text content specific?


I hope that makes sense and would really appreciate some guidance.

 

Thanks,

Adam

1 Answer, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 30 Aug 2013, 12:44 PM
Hi Adam,

Normally the data bound to a step step is being used to alter the value of the target element e.g. either set a checkbox to true for false, or the data to be entered into an input field. Since a click step does not have any sort of value property, there is no reason to databind it.

A possible option is to use DataFindExpression and then click on that element. If your test has an attached data source, the value fields of the find expressions for your elements will include a drop-down list displaying columns from your data source and it will look for an item that matches the data in your data source.

Please check out this article.

Hope this helps.

Regards,
Boyan Boev
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Adam
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Share this question
or