Completed
Last Updated: 06 Feb 2014 14:28 by ADMIN
ADMIN
Mario
Created on: 21 Oct 2013 19:43
Type: Bug Report
1
Data-driven drop-down selection written in code fails to choose available option by text when it contains a non breaking space ( )
Steps to reproduce:
1) Run test which data-drives selecting an option ByText using code (dropdown). The text of this option should also contain a non-breaking space ( ) somewhere in its value. 

Expected result:
At least one of the two iterations seen should successfully select the 'Opel 2' option from the drop-down menu, either with a ByText value of 'Opel 2' or 'Opel 2'.

Actual result:
Both iterations fail, see errors below (value and options highlighted):

Overall Result: Fail
------------------------------------------------------------
'10/21/2013 2:52:30 PM' - [Iteration #1: (Col1=Opel 2)]
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
Exception thrown executing coded step: '[WebTest_CodedStep] : Select 'ByText' option 'Saab 1' on 'ASelect''.
InnerException:
ArtOfTest.WebAii.Exceptions.ExecuteCommandException: 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 'Opel 2' in the dropdown requested. DropDown had the following values only: 
 Volvo 0,
Saab 1,
Opel 2,
Audi 3,

   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:Opel 2',ClientId:'Client_82c38f62-272e-4304-9536-7569b0c87fe7',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 'Opel 2' in the dropdown requested. DropDown had the following values only: 
 Volvo 0,
Saab 1,
Opel 2,
Audi 3,

   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.

   at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Actions.DoSelectDropDown(Element targetElement, String data)
   at ArtOfTest.WebAii.Core.Actions.SelectDropDown(Element targetElement, String text, Boolean useValue)
   at ArtOfTest.WebAii.Core.Actions.SelectDropDown(Element targetElement, String itemText)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlSelect.SelectByText(String text, Boolean invokeOnChangeEvent)

------------------------------------------------------------
'10/21/2013 2:52:32 PM' - [Iteration #2: (Col1=Opel 2)]
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
Exception thrown executing coded step: '[WebTest_CodedStep] : Select 'ByText' option 'Saab 1' on 'ASelect''.
InnerException:
ArtOfTest.WebAii.Exceptions.ExecuteCommandException: 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 'Opel 2' in the dropdown requested. DropDown had the following values only: 
 Volvo 0,
Saab 1,
Opel 2,
Audi 3,

   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:Opel 2',ClientId:'Client_82c38f62-272e-4304-9536-7569b0c87fe7',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 'Opel 2' in the dropdown requested. DropDown had the following values only: 
 Volvo 0,
Saab 1,
Opel 2,
Audi 3,

   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.

   at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Actions.DoSelectDropDown(Element targetElement, String data)
   at ArtOfTest.WebAii.Core.Actions.SelectDropDown(Element targetElement, String text, Boolean useValue)
   at ArtOfTest.WebAii.Core.Actions.SelectDropDown(Element targetElement, String itemText)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlSelect.SelectByText(String text, Boolean invokeOnChangeEvent)
2 comments
ADMIN
Daniel Djambov
Posted on: 06 Feb 2014 14:28
Telerik: The issue is fixed and solution will be available in our next product release from Feb 2014. Please note that you cannot use the entity used to represent a non-breaking space( ) in the database, so the itteration 'Opel 2' will fail as expected. 'Opel 2' - should work as expected now. 
Daniel
Posted on: 21 Oct 2013 20:38
Thank you for posting this.  I hope it is able to be resolved soon!