5 Answers, 1 is accepted
Great question. If I understand the problem correctly, when the test starts there are extra items already selected in the multiselect control, and those items need to be removed before selecting the items you really wanted. I created this video demonstrating how you can remove all selected items easily in a simple coded step.
http://screencast.com/t/e8IxhJJS1uvz
Let me know if this helps.
Regards,
Cody
Telerik
Hi Cody,
Perhaps I should reword my previous post. When I type in a name into a text box, all the users with that name appear below as gathered from the ajax call (it is not a multiselect as I can only choose one person out of all of the names). In the first scenario while using Data Driven Automation, I used the wait step to wait until the box containing the name below appeared. It works fine for the first scenario, but when I come to the next name and more than one name appears underneath, the execution stalls (potentially because the size of the box containing the names changed). Please advise anything that may help.
Ah, I guess I got it backwards. My apologies. So instead of clearing it you want to add multiple names/selections. I don't know what problem you're running into. Attached is a sample data driven test that uses our public demo page. You can run it yourself. The main test, Sample HTML Test, calls WebTest which does the real work. The parent test simply clears the current list. The subtest uses localdata for the data source.
Let me know if this sample helps you overcome the issue you're running into.
Regards,
Cody
Telerik
Hi Cody,
I actually don't want to add or delete names. The names that appear are relevant to if more than one individual has the same name that is typed in the text box. In the first name that it is inputted, only one person has that name so only one name appears below. In the next case, there are 2 people that have the same name, so 2 names appear below. The test passes for the first instance (I have a wait step that waits for the container of the names below to appear before moving on). For the second step it stalls (maybe because the size of the box changed). Are there any suggestions of what I can do? I have attached an example of the first case what the drop down that I am referring to looks like.
Thank you for the clarification. My apologies I seem to keep missing the mark on what the technical issue is. I think I've got it now with your explanation "For the second step it stalls (maybe because the size of the box changed)." referring to the case where's there's more than one item listed because of duplicate names.
I cannot think of any reason why the test would stall. That is not normal at all. I need to see this happening first hand so I can troubleshoot what's going on. I'm unable to reproduce this behavior using our demo page. Do you have a publicly accessible URL I can connect to which demonstrates this problem? Can you also provide detailed instructions how to reproduce this problem?
I look forward to hearing back from you.
Regards,
Cody
Telerik