public void ShouldReturnAccessibilityValue()
 {
     mockProcessor.ExpectAndReturn("GetEval", "Some Accessibility Return Value",
                                   "document['Test'].content.accessibility;");
     silvernium = new Silvernium(selenium, "Test");
     Assert.AreEqual("Some Accessibility Return Value", silvernium.Accessibility());
 }
 public void SetUp()
 {
     selenium = new DefaultSelenium("localhost", 4444, "*iexplore", URL);
     selenium.Start();
     selenium.Open(URL);
     silvernium = new Silvernium(selenium, OBJECTID, SCRIPTKEY);
 }
 public void SetUp()
 {
     selenium = new DefaultSelenium("localhost", 4444, "*iexplore", "http://localhost");
     selenium.Start();
     selenium.Open("http://localhost");
     silvernium = new Silvernium(selenium, "Test");
 }
 public void ShouldReturnJSFunctionForDirectMethodForMSIE()
 {
     mockProcessor.ExpectAndReturn("GetEval", "MSIE", "navigator.userAgent");
     silvernium = new Silvernium(selenium, "Test");
     Assert.AreEqual("window.document['Test'].Func1();", silvernium.jsForDirectMethod("Func1"));
     Assert.AreEqual("window.document['Test'].Func2('42');", silvernium.jsForDirectMethod("Func2", "42"));
     Assert.AreEqual("window.document['Test'].Func3('42','24');",
                     silvernium.jsForDirectMethod("Func3", new[] {"42", "24"}));
 }
 public void ShouldReturnJSFunctionForContentMethodForFF2()
 {
     mockProcessor.ExpectAndReturn("GetEval", "Firefox/2.0.0.18", "navigator.userAgent");
     silvernium = new Silvernium(selenium, "Test", "Key");
     Assert.AreEqual("document['Test'].content.Func1();", silvernium.jsForContentMethod("Func1"));
     Assert.AreEqual("document['Test'].content.Func2('42');",
                     silvernium.jsForContentMethod("Func2", "42"));
     Assert.AreEqual("document['Test'].content.Func3('42','24');",
                     silvernium.jsForContentMethod("Func3", new[] { "42", "24" }));
 }
 public void ShouldCallSettingsProperties()
 {
     mockProcessor.ExpectAndReturn("GetEval", "True", "document['Test'].settings.enabledFramerateCounter;");
     mockProcessor.ExpectAndReturn("GetEval", "True", "document['Test'].settings.enableRedrawRegions;");
     mockProcessor.ExpectAndReturn("GetEval", "True", "document['Test'].settings.enableHtmlAccess;");
     mockProcessor.ExpectAndReturn("GetEval", "42", "document['Test'].settings.maxFrameRate;");
     mockProcessor.ExpectAndReturn("GetEval", "True", "document['Test'].settings.windowless;");
     silvernium = new Silvernium(selenium, "Test");
     Assert.IsTrue(silvernium.EnabledFrameRateCounter());
     Assert.IsTrue(silvernium.EnableRedrawRegions());
     Assert.IsTrue(silvernium.EnableHtmlAccess());
     Assert.AreEqual(42, silvernium.MaxFrameRate());
     Assert.IsTrue(silvernium.WindowLess());
 }
 public void ShouldReturnDocumentJSPrefixForFF2()
 {
     mockProcessor.ExpectAndReturn("GetEval", "Firefox/2.0.0.18", "navigator.userAgent");
     silvernium = new Silvernium(selenium, "test");
     Assert.AreEqual("document['test'].", silvernium.createJSPrefixDocument("test"));
 }
Beispiel #8
0
 public DataGridFixture(ThoughtWorks.Selenium.Silvernium.Silvernium silvernium, string path, string pagerPath)
     : base(silvernium, path)
 {
     PagerPath = pagerPath;
     AssertPathPresent(pagerPath);
 }
Beispiel #9
0
 public DataGridFixture(ThoughtWorks.Selenium.Silvernium.Silvernium silvernium, string path)
     : base(silvernium, path)
 {
 }
 public DataRowFixture(ThoughtWorks.Selenium.Silvernium.Silvernium silvernium, string path, int index)
     : base(silvernium, path)
 {
     Index = index;
 }
 public void ShouldReturnBackgroundInformation()
 {
     mockProcessor.ExpectAndReturn("GetEval", "Bg Info", "document['Test'].settings.background;");
     silvernium = new Silvernium(selenium, "Test");
     Assert.AreEqual("Bg Info", silvernium.Background());
 }
 public void ShouldReturnActualWidthOfMovie()
 {
     mockProcessor.ExpectAndReturn("GetEval", "24", "document['Test'].content.actualWidth;");
     silvernium = new Silvernium(selenium, "Test");
     Assert.AreEqual(24, silvernium.ActualWidth());
 }
 public void ShouldReturnTrueIfLoaded()
 {
     mockProcessor.ExpectAndReturn("GetEval", "True", "document['Test'].isLoaded;");
     silvernium = new Silvernium(selenium, "Test");
     Assert.IsTrue(silvernium.IsLoaded());
 }
 public void ShouldInitParams()
 {
     mockProcessor.ExpectAndReturn("GetEval", "List of init params", "document['Test'].initParams;");
     silvernium = new Silvernium(selenium, "Test");
     Assert.AreEqual("List of init params", silvernium.InitParams());
 }
 public void ShouldFindName()
 {
     mockProcessor.ExpectAndReturn("GetEval", "Return Name", "document['Test'].content.findName('objectName');");
     silvernium = new Silvernium(selenium, "Test");
     Assert.AreEqual("Return Name", silvernium.FindName("objectName"));
 }
 public void ShouldCreateXAMLContent()
 {
     mockProcessor.Expect("GetEval", "document['Test'].content.createFromXaml('xamlContent','namescope');");
     silvernium = new Silvernium(selenium, "Test");
     silvernium.CreateFromXAML("xamlContent", "namescope");
 }
 public void ShouldReturnTrueIfVersionIsSupported()
 {
     mockProcessor.ExpectAndReturn("GetEval", "true", "document['Test'].isVersionSupported('10');");
     silvernium = new Silvernium(selenium, "Test");
     Assert.IsTrue(silvernium.IsVersionSupported("10"));
 }
 public void ShouldReturnRoot()
 {
     mockProcessor.ExpectAndReturn("GetEval", "Root Content", "document['Test'].root;");
     silvernium = new Silvernium(selenium, "Test");
     Assert.AreEqual("Root Content", silvernium.Root());
 }
 public void ShouldReturnSource()
 {
     mockProcessor.ExpectAndReturn("GetEval", "Source Code", "document['Test'].source;");
     silvernium = new Silvernium(selenium, "Test");
     Assert.AreEqual("Source Code", silvernium.Source());
 }
 public void ShouldReturnActualHeightOfMovie()
 {
     mockProcessor.ExpectAndReturn("GetEval", "42", "document['Test'].content.actualHeight;");
     silvernium = new Silvernium(selenium, "Test");
     Assert.AreEqual(42, silvernium.ActualHeight());
 }
 public void ShouldReturnFullScreenAttributes()
 {
     mockProcessor.ExpectAndReturn("GetEval", "True", "document['Test'].content.fullScreen;");
     silvernium = new Silvernium(selenium, "Test");
     Assert.IsTrue(silvernium.FullScreen());
 }