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

How to select the third result from a drop-down menu

4 Answers 103 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dean
Top achievements
Rank 1
Dean asked on 06 Nov 2012, 05:41 AM

I'd like to select a result from a drop down menu that isn't based off it's contents.

So I want to be able to select the First, Second, Third result from a drop down menu that doesn't rely on it's contents.

This is because the results in the drop down menu are date based and I do not want to keep having to reset the dates in the tests.


Attached is the DOM view of the Drop-Down menu

If it requires a coded step please include instructions on how to integrate it into a test as a step, as I have really only been using recorded steps so far.

Dean

4 Answers, 1 is accepted

Sort by
0
Dean
Top achievements
Rank 1
answered on 06 Nov 2012, 07:59 AM

Heya found the answer to this one

Thanks
Dean
0
Ivaylo
Telerik team
answered on 08 Nov 2012, 11:48 AM
Hi Dean,

I am happy to hear you managed to solve this problem.
If you have any further questions please let us know.

All the best,
Ivaylo
the Telerik team
Are you enjoying Test Studio? We’d appreciate your vote in the ATI automation awards.
Vote now
0
Arbind
Top achievements
Rank 1
answered on 06 May 2014, 05:25 AM
I have same issue.i have record all the step correctly.but while I am run those in dropdown step its showing error.
ExecuteCommand failed!
InError set by the client. Client Error:
System.ApplicationException: Unexpected error thrown while setting the dropdown ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: DropDown was unable to find the item 'Español' in the dropdown requested. DropDown had the following values only:
 
   at ArtOfTest.InternetExplorer.IECommandProcessor.SelectDropDown(IHTMLElement target, Int32 index, String text, Boolean useValue)
   --- End of inner exception stack trace ---
   at ArtOfTest.InternetExplorer.IECommandProcessor.SelectDropDown(IHTMLElement target, Int32 index, String text, Boolean useValue)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Action',Info:'NotSet',Action:'SelectDropDown',Target:'ElementId (tagName: 'select',occurrenceIndex: '0')',Data:'T:Español',ClientId:'Client_99a9e3b2-11c1-4cab-9ca3-31a3dcac3d3d',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.ApplicationException: Unexpected error thrown while setting the dropdown ---> System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: DropDown was unable to find the item 'Español' in the dropdown requested. DropDown had the following values only:
 
   at ArtOfTest.InternetExplorer.IECommandProcessor.SelectDropDown(IHTMLElement target, Int32 index, String text, Boolean useValue)
   --- End of inner exception stack trace ---
   at ArtOfTest.InternetExplorer.IECommandProcessor.SelectDropDown(IHTMLElement target, Int32 index, String text, Boolean useValue)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none

so dropdown value is not comming .please response ASAP .its urgent.
0
Ivaylo
Telerik team
answered on 06 May 2014, 02:50 PM
Hello Arbind,

I am closing this as a duplicate of the following thread:

http://www.telerik.com/forums/drop-down-vale-is-not-coming-while-run-the-test-step-urgent-please-response-assp



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