Exemplo n.º 1
0
        public void shouldReturnJSPrefixForFirefox3()
        {
            mockProcessor.ExpectAndReturn("GetEval", Firefox3UserAgentInfo, new object[] { "navigator.userAgent" });
            ISelenium selenium = (ISelenium)mockProcessor.MockInstance;
            FlashSeleniumExtensionForTest flashSelenium = new FlashSeleniumExtensionForTest(selenium, "test");

            Assert.AreEqual("window.document['test'].", flashSelenium.checkBrowserAndReturnJSPrefix());
        }
Exemplo n.º 2
0
        public void shouldConstructProperJSFunctionCallWithMultipleParamsCastedToStringForFirefox2()
        {
            mockProcessor.ExpectAndReturn("GetEval", Firefox2UserAgentInfo, new object[] { "navigator.userAgent" });
            ISelenium selenium1 = (ISelenium)mockProcessor.MockInstance;
            FlashSeleniumExtensionForTest flashSeleniumExtensionForTest = new FlashSeleniumExtensionForTest(selenium1, "test");
            string actual = flashSeleniumExtensionForTest.jsForFunction("functionName", 42.ToString(), 'S'.ToString(), (42.42).ToString());

            Assert.AreEqual("document['test'].functionName('42','S','42.42');", actual);
        }
Exemplo n.º 3
0
        public void shouldConstructProperJSFunctionCallWithParamsForFirefox2()
        {
            mockProcessor.ExpectAndReturn("GetEval", Firefox2UserAgentInfo, new object[] { "navigator.userAgent" });
            ISelenium selenium = (ISelenium)mockProcessor.MockInstance;
            FlashSeleniumExtensionForTest flashSeleniumExtensionForTest = new FlashSeleniumExtensionForTest(selenium, "test");
            string actual = flashSeleniumExtensionForTest.jsForFunction("functionName", "Param1", "Param2");

            Assert.AreEqual("document['test'].functionName('Param1','Param2');", actual);
        }
 public void shouldReturnJSPrefixForFirefox3()
 {
     mockProcessor.ExpectAndReturn("GetEval", Firefox3UserAgentInfo, new object[] { "navigator.userAgent" });
     ISelenium selenium = (ISelenium)mockProcessor.MockInstance;
     FlashSeleniumExtensionForTest flashSelenium = new FlashSeleniumExtensionForTest(selenium, "test");
     Assert.AreEqual("window.document['test'].", flashSelenium.checkBrowserAndReturnJSPrefix());
 }
 public void shouldConstructProperJSFunctionCallWithMultipleParamsCastedToStringForFirefox2()
 {
     mockProcessor.ExpectAndReturn("GetEval", Firefox2UserAgentInfo, new object[] { "navigator.userAgent" });
     ISelenium selenium1 = (ISelenium) mockProcessor.MockInstance;
     FlashSeleniumExtensionForTest flashSeleniumExtensionForTest = new FlashSeleniumExtensionForTest(selenium1, "test");
     string actual = flashSeleniumExtensionForTest.jsForFunction("functionName",42.ToString(), 'S'.ToString(), (42.42).ToString());
     Assert.AreEqual("document['test'].functionName('42','S','42.42');", actual);
 }
 public void shouldConstructProperJSFunctionCallWithParamsForFirefox2()
 {
     mockProcessor.ExpectAndReturn("GetEval", Firefox2UserAgentInfo, new object[] { "navigator.userAgent" });
     ISelenium selenium = (ISelenium) mockProcessor.MockInstance;
     FlashSeleniumExtensionForTest flashSeleniumExtensionForTest = new FlashSeleniumExtensionForTest(selenium, "test");
     string actual = flashSeleniumExtensionForTest.jsForFunction("functionName", "Param1", "Param2");
     Assert.AreEqual("document['test'].functionName('Param1','Param2');", actual);
 }