コード例 #1
0
 private void _GenericGetJSPrefix(string pUserAgentInfo)
 {
     using (JavaSeleniumJSTest javaSelenium = new JavaSeleniumJSTest(_ConfigureMock(pUserAgentInfo), OBJECT_ID))
     {
         Assert.AreEqual("window.document.getElementById(\"" + OBJECT_ID + "\").", javaSelenium.JSPrefix);
     }
 }
コード例 #2
0
 private void _GenericSetField2(string pUserAgentInfo)
 {
     using (JavaSeleniumJSTest javaSelenium = new JavaSeleniumJSTest(_ConfigureMock(pUserAgentInfo), OBJECT_ID))
     {
         string value = javaSelenium.CreateJSForSetField("fieldName", 10);
         Assert.AreEqual("window.document.getElementById(\"" + OBJECT_ID + "\").fieldName = 10;", value);
     }
 }
コード例 #3
0
 private void _GenericFunction3(string pUserAgentInfo)
 {
     using (JavaSeleniumJSTest javaSelenium = new JavaSeleniumJSTest(_ConfigureMock(pUserAgentInfo), OBJECT_ID))
     {
         string value = javaSelenium.CreateJSForMethodInvocation("functionName", "param1", "param2");
         Assert.AreEqual("window.document.getElementById(\"" + OBJECT_ID + "\").functionName(\"param1\",\"param2\");", value);
     }
 }
コード例 #4
0
        public void invokeGetJSPrefixGeneric()
        {
            _seleniumMock.ExpectAndReturn("GetEval", "RandomUserAgentInfo", new object[] { "navigator.userAgent" });
            ISelenium selenium = (ISelenium)_seleniumMock.MockInstance;

            using (JavaSeleniumJSTest javaSelenium = new JavaSeleniumJSTest(selenium, OBJECT_ID))
            {
                Assert.AreEqual("document.getElementById(\"" + OBJECT_ID + "\").", javaSelenium.JSPrefix);
            }
        }
コード例 #5
0
ファイル: CoreSeleniumTest.cs プロジェクト: codehaus/fest-git
 private void _GenericSetField2(string pUserAgentInfo)
 {
     using (JavaSeleniumJSTest javaSelenium = new JavaSeleniumJSTest(_ConfigureMock(pUserAgentInfo), OBJECT_ID))
     {
         string value = javaSelenium.CreateJSForSetField("fieldName", 10);
         Assert.AreEqual("window.document.getElementById(\"" + OBJECT_ID + "\").fieldName = 10;", value);
     }
 }
コード例 #6
0
ファイル: CoreSeleniumTest.cs プロジェクト: codehaus/fest-git
 private void _GenericGetJSPrefix(string pUserAgentInfo)
 {
     using (JavaSeleniumJSTest javaSelenium = new JavaSeleniumJSTest(_ConfigureMock(pUserAgentInfo), OBJECT_ID))
     {
         Assert.AreEqual("window.document.getElementById(\"" + OBJECT_ID + "\").", javaSelenium.JSPrefix);
     }
 }
コード例 #7
0
ファイル: CoreSeleniumTest.cs プロジェクト: codehaus/fest-git
 private void _GenericFunction3(string pUserAgentInfo)
 {
     using (JavaSeleniumJSTest javaSelenium = new JavaSeleniumJSTest(_ConfigureMock(pUserAgentInfo), OBJECT_ID))
     {
         string value = javaSelenium.CreateJSForMethodInvocation("functionName", "param1", "param2");
         Assert.AreEqual("window.document.getElementById(\"" + OBJECT_ID + "\").functionName(\"param1\",\"param2\");", value);
     }
 }
コード例 #8
0
ファイル: CoreSeleniumTest.cs プロジェクト: codehaus/fest-git
        public void invokeGetJSPrefixGeneric()
        {
            _seleniumMock.ExpectAndReturn("GetEval", "RandomUserAgentInfo", new object[] {"navigator.userAgent"});
            ISelenium selenium = (ISelenium) _seleniumMock.MockInstance;

            using (JavaSeleniumJSTest javaSelenium = new JavaSeleniumJSTest(selenium, OBJECT_ID))
            {
                Assert.AreEqual("document.getElementById(\"" + OBJECT_ID + "\").", javaSelenium.JSPrefix);
            }
        }