Unstable exeption in HtmlInputCheckBox.Check()

2 posts, 0 answers
  1. Ivan
    Ivan avatar
    18 posts
    Member since:
    Jul 2016

    Posted 19 Oct 2017 Link to this post

    Hello,
    sometimes I have "System.Reflection.TargetException: Object does not match target type." exception in HtmlInputCheckBox.Check() method.
    Can anybody say what happens? And fix it.

    The stackTrace is below.

    Exception thrown executing coded step: 'Configure 'Repeat on' days'.
    InnerException:
    ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
    InError set by the client. Client Error:
    System.Reflection.TargetException: Object does not match target type.
       at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
       at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       at CallSite.Target(Closure , CallSite , Object , String , BindingFlags , Object , Object , Object )
       at System.Dynamic.UpdateDelegates.UpdateAndExecute6[T0,T1,T2,T3,T4,T5,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
       at CallSite.Target(Closure , CallSite , Object , String , BindingFlags , Object , Object , Object )
       at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeFunction(String functionCall, Boolean useEval, Boolean returnJson, IHTMLDocument2 doc)
       at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
       at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommandInternal(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
    BrowserCommand (Type:'Action',Info:'NotSet',Action:'InvokeJsFunction',Target:'ElementId (tagName: '',occurrenceIndex: '-1')',Data:'document.getElementsByTagName('input')[14].checked',ClientId:'Client_9419ea84-45a6-4dde-b63a-243e6f22aa03',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.Reflection.TargetException: Object does not match target type.
       at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
       at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       at CallSite.Target(Closure , CallSite , Object , String , BindingFlags , Object , Object , Object )
       at System.Dynamic.UpdateDelegates.UpdateAndExecute6[T0,T1,T2,T3,T4,T5,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5)
       at CallSite.Target(Closure , CallSite , Object , String , BindingFlags , Object , Object , Object )
       at ArtOfTest.InternetExplorer.IECommandProcessor.InvokeFunction(String functionCall, Boolean useEval, Boolean returnJson, IHTMLDocument2 doc)
       at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessActionCommands(BrowserCommand request)
       at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommandInternal(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.Actions.InvokeScript(String script, Boolean refreshDom)
       at ArtOfTest.WebAii.ObjectModel.Element.GetValue[T](String propertyName, T defaultValue)
       at ArtOfTest.WebAii.ObjectModel.Element.GetValue[T](String propertyName)
       at ArtOfTest.WebAii.Controls.HtmlControls.HtmlRadioCheckboxControl.get_Checked()
       at ArtOfTest.WebAii.Controls.HtmlControls.HtmlRadioCheckboxControl.Check(Boolean isChecked)

  2. Nikolay Petrov
    Admin
    Nikolay Petrov avatar
    308 posts

    Posted 23 Oct 2017 Link to this post

    Hello Ivan,

    Would you provide a bit more information on this case please? 

    Which product version do you use? Which browser version you are running on? 

    If using IE - please make sure that the application does not force the browser to act as lower than IE 11 version. If not using IE - make sure you are using latest Test Studio extensions available.

    Is it possible using latest product version to reproduce this problem on a public facing application? Please provide further details if possible or provide sample test script.

    I'm looking forward to hear from you.

    Best Regards,
    Nikolay Petrov
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top