private void _GenericGetJSPrefix(string pUserAgentInfo) { using (JavaSeleniumJSTest javaSelenium = new JavaSeleniumJSTest(_ConfigureMock(pUserAgentInfo), OBJECT_ID)) { Assert.AreEqual("window.document.getElementById(\"" + OBJECT_ID + "\").", javaSelenium.JSPrefix); } }
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); } }
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); } }
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); } }
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); } }