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

End of Stream error when clicking HtmlInputButton

8 Answers 110 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jamie
Top achievements
Rank 2
Jamie asked on 30 Aug 2011, 03:50 PM
This issue was found when I was testing my other thread, http://www.telerik.com/automated-testing-tools/community/forums/test-studio-express/automation-framework/javascript-message-box-handling.aspx, in regards to dialog handling on IE7.  The latest internal build, 111.8.29.0, appears to have resolved my dialog handling issue on IE7 machines.  However I know am getting a different error on a couple of my tests, regardless of version of Internet Explorer (IE7 or IE8), when running the automated tests through MSTest on a controller/agent evironment.  Note, this tests work on my computer when running through Visual Studio 2010.  Also, I still have the issue that my one application does not work on the latest buid because of the popup blocker check is causing IE to reload, which causes my tests to fail, this is another open thread I have created.

The error:
Test method AgencyTestAutomation.RSSTest.RSS_SkillsTabAddChecklistScales threw exception: ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed! BrowserCommand (Type:'Action',Info:'NotSet',Action:'Click',Target:'ElementId (tagName: 'input',occurrenceIndex: '6')',Data:'',ClientId:'Client_a059478c-adc9-4943-a6db-cb91d0aa7f2d',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'') InnerException: System.Runtime.Serialization.SerializationException: End of Stream encountered before parsing was completed. at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) at ArtOfTest.WebAii.Messaging.Process.PipeCommand.FromBinary[T](Byte[] bytes) at ArtOfTest.WebAii.Messaging.Process.PipeCommunication.ReadCommandFromPipe[T](PipeStream pipe) at ArtOfTest.WebAii.Messaging.Process.BrowserRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId) at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request) ---> System.Runtime.Serialization.SerializationException: End of Stream encountered before parsing was completed.



Appears to be failing when I am clicking on an HtmlInputButton control, that causes the pop up browser window to be closed.  It consistently fails on these two tests, and I have other tests with similar code.  Any idea on what I can do to troubleshoot this issue?

8 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 31 Aug 2011, 04:53 AM
Hello Jamie,

The first, farily obvious thing to verify is that you're using the same build on all the machines. For example, this could happen if your development machine has 111.8.29.0 installed but the MSTest agent machine has 111.7.15 installed.

If that's not the problem, can you share with us the test that has the problem and tell us which test step is causing this error? We'd like to study it to see if we can reproduce this problem.

All the best,
Cody
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Jamie
Top achievements
Rank 2
answered on 31 Aug 2011, 01:11 PM
Yes, all the machines are running the same version of software,  I will try to reproduce this issue in a smaller test with a sample web page if I can.
0
Jamie
Top achievements
Rank 2
answered on 31 Aug 2011, 06:33 PM
I changed from using HtmlInputButton.Click() to use a HtmlInputButton.MouseClick() in my VS2010 test.  It appears to have resolved my issue, however I will still try to create a sample test that duplicates the issue.

0
Cody
Telerik team
answered on 01 Sep 2011, 05:27 AM
Hello Jamie,

Ok, that would be great! We'll standby for that update.

Kind regards,
Cody
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Jamie
Top achievements
Rank 2
answered on 01 Sep 2011, 05:15 PM
I have created a sample web page and a small test in my visual studio project but I have not been able to reproduce this issue.  However if I change my original test to use the HtmlInputButton.Click(true) method call, it fails, consistently.  If I change my test back to call HtmlInputButton.MouseClick() it works, consistently.

Another thing to note is that I am running 16 tests, and two of them fail consistently with the same issue inregards to the button.Click(true) method.  If I change the tests to use the button.MouseClick() they all pass, consistently.

I changed mstest to run just that one specific test and it still fails.  Fails on three different agents, all agents have 111.8.29.0 version, they are three different Windows OS's and between IE7 and IE8.  I get the same error.  But if I change the test to use the MouseClick() it works.

I cannot duplicate it with my sample test page I was creating so I do not know where to go next from here.

I am going to have to revert back my versions back to .502 so I can demo this for others in my organization so is there anything that could be looked soon before I need to revert versions?
0
Cody
Telerik team
answered on 07 Sep 2011, 08:01 PM
Hello Jamie,

I apologize for the delay responding back to you.

Since we can't see and study the problem first hand we'll be unable to determine what is causing it. I am glad you found that HtmlInputButton.MouseClick seems to resolve the issue. I don't think there's anything we can learn even by watching the problem happen on your machine.

Regards,
Cody
the Telerik team
Vote for Telerik Test Studio at the Annual Automation Honors Voting!
0
Denis
Top achievements
Rank 1
answered on 10 Sep 2013, 12:37 PM
Hello Telerik team, 

Today I've updated Telerik Framework from version 2011 to 2013 and encountered the issue, mentioned in first post.
We have a lot of places in our project where we use HtmlInputSubmit.Click(true) and after update we get the following exception here:

ArtOfTest.WebAii.Exceptions.ExecuteCommandException was unhandled by user code
  Message=ExecuteCommand failed!
BrowserCommand (Type:'Action',Info:'NotSet',Action:'Click',Target:'ElementId (tagName: 'input',occurrenceIndex: '9')',Data:'',ClientId:'Client_3158cd78-d9b8-4ecb-8001-1f39d2b9ddac',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')
InnerException: System.Runtime.Serialization.SerializationException: End of Stream encountered before parsing was completed.
   at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
   at ArtOfTest.WebAii.Messaging.Process.PipeCommand.FromBinary[T](Byte[] bytes)
   at ArtOfTest.WebAii.Messaging.Process.PipeCommunication.ReadCommandFromPipe[T](PipeStream pipe)
   at ArtOfTest.WebAii.Messaging.Process.BrowserRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)

  Source=ArtOfTest.WebAii
  StackTrace:
       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.Click(Element targetElement)
       at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.Click()
       at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.Click(Boolean isClosing)
       at IFS.AF.UIControls.Context.ActivityReportPage.Close() in C:\QA_Telerik_MSpec\IFS.AF.UIControls\Context\ActivityReportPage.cs:line 581
       at IFS.AF.UIControls.Tests.FixedFifo_New.Tc_AF_FF_017.<.ctor>b__5() in C:\QA_Telerik_MSpec\IFS.AF.UIControls\Tests\FixedFifo_New\Tc_AF_FF_017.cs:line 124
       at Machine.Specifications.Utility.RandomExtensionMethods.InvokeAll(IEnumerable`1 actions)
       at Machine.Specifications.Utility.RandomExtensionMethods.InvokeAll(IEnumerable`1 becauseActions)
       at Machine.Specifications.Model.Context.EstablishContext()
  InnerException: System.Runtime.Serialization.SerializationException
       Message=End of Stream encountered before parsing was completed.
       Source=mscorlib
       StackTrace:
            at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()
            at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
            at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
            at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream)
            at ArtOfTest.WebAii.Messaging.Process.PipeCommand.FromBinary[T](Byte[] bytes)
            at ArtOfTest.WebAii.Messaging.Process.PipeCommunication.ReadCommandFromPipe[T](PipeStream pipe)
            at ArtOfTest.WebAii.Messaging.Process.BrowserRemoted.ProcessBrowserRequest(BrowserCommand command, String requestId)
            at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
       InnerException: 

This issue I reproduced on several test machines, where I installed new Telerik version.
Browser type: IE8.

Do you have any ideas why this happens and how to solve it?


Thanks in advance,
Denis

0
Velin Koychev
Telerik team
answered on 13 Sep 2013, 10:47 AM
Hi Denis,

I am sorry to hear that  you are experiencing this issue.

Did you try the workaround suggested in a previous reply to use HtmlInputButton.MouseClick()?

If you continue to experience the same problem, we will need more details about that in order to come to the root of the issue. Please provide us with a copy of your test and if it is possible grant us access to your application so we can reproduce the issue on our end and give you a solution.
If direct access is not possible, capture a Fiddler trace and attach it to this support ticket in a zip file. If you are unfamiliar with how to do so, this link will provide you with step-by-step instructions for download and use. Please make sure to enable 'Decrypt HTTPS traffic' and 'Store binaries' options (see attached image) before starting capture.

Looking forward to hearing from you.

 

Regards,
Velin Koychev
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Jamie
Top achievements
Rank 2
Answers by
Cody
Telerik team
Jamie
Top achievements
Rank 2
Denis
Top achievements
Rank 1
Velin Koychev
Telerik team
Share this question
or