Completed
Last Updated: 23 Sep 2013 15:03 by Imported User
ADMIN
Cody
Created on: 11 Jun 2013 18:02
Type: Bug Report
1
Specific JS fails in Firefox, not IE or Chrome
Here is the code:

        const string JS = "( function() { var ls = []; for(var i = 0; i < 10; i++) ls.push({ Key: \"key_\" + i, Value: \"value_\" + i }); return ls; } )();";

        [TestMethod]
        public void testJavascriptReturnsDictionaryIe()
        {
            Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
            ActiveBrowser.NavigateTo("http://www.telerik.com/products/free-testing-framework/overview.aspx");
            var result = Actions.InvokeScript<Dictionary<string, string>>(JS);
        }

        [TestMethod]
        public void testJavascriptReturnsDictionaryFirefox()
        {
            Manager.LaunchNewBrowser(BrowserType.FireFox);
            ActiveBrowser.NavigateTo("http://www.telerik.com/products/free-testing-framework/overview.aspx");
            var result = Actions.InvokeScript<Dictionary<string, string>>(JS);
        }

        [TestMethod]
        public void testJavascriptReturnsDictionaryChrome()
        {
            Manager.LaunchNewBrowser(BrowserType.Chrome);
            ActiveBrowser.NavigateTo("http://www.telerik.com/products/free-testing-framework/overview.aspx");
            var result = Actions.InvokeScript<Dictionary<string, string>>(JS);
        }

The functions for IE and Chrome work as expected. Firefox returns the error:

The Test method MySampleTests.TelerikVSUnitTest1.testJavascriptReturnsDictionaryFirefox threw exception: 
System.Runtime.Serialization.SerializationException: The data contract type 'System.Runtime.Serialization.KeyValue`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' cannot be deserialized because the required data members 'Key, Value' were not found
2 comments
Imported User
Posted on: 23 Sep 2013 15:03
Thank you! I look forward to checking it out.
ADMIN
Daniel Djambov
Posted on: 20 Aug 2013 10:53
Issue is fixed and solution will be available in the next internal release/service pack post 2013 R1