Exemplo n.º 1
0
        // ================================================================

        private GingerNode StartDriverOnGingerNode(PluginDriverBase driver, string NodeName, string GingerGridHost = "127.0.0.1", int GingerGridPort = 15001)
        {
            Console.WriteLine("Driver Name: " + driver.Name);
            DriverCapabilities DC = new DriverCapabilities();

            //TODO: add info about the driver and machine
            DC.Platform = "Web";   // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
            DC.OS       = "Win 7"; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

            GingerNode GN = new GingerNode(DC, driver);

            GN.StartGingerNode(NodeName, GingerGridHost, GingerGridPort);

            Console.WriteLine("Ginger Node started - " + NodeName);  // Add ports and GingerGrid details
            return(GN);
        }
Exemplo n.º 2
0
        public void ProvidingBrowserNameAndAppPackageForHybridAppDoesNotThrowForAndroid()
        {
            TestEnvironmentParameters p = new TestEnvironmentParameters {
                RS_AppType     = ApplicationType.HYBRID,
                RS_BrowserName = MobileBrowserType.Chrome,
                RS_DeviceGroup = "Android;Tablet",
                RS_AppPackage  = "some.test.package",
                RS_AppActivity = ".SomeMainActivity"
            };

            DriverCapabilities          caps       = new DriverCapabilities(p);
            Dictionary <string, object> setOptions = caps.GetDriverOptions().ToDictionary();

            Assert.NotNull(caps.GetDriverOptions(), "Options should be set.");
            Assert.False(setOptions.ContainsKey("browserName"), "Browser name should be null for hybrid apps");
            Assert.DoesNotThrow(() => caps.PreReqChecks(), "Prereq checks should pass");
        }
Exemplo n.º 3
0
        public void SpecifyingParametersWithRS_PrefixOverridesRunSettingsParameters()
        {
            TestEnvironmentParameters p = new TestEnvironmentParameters {
                RS_AppType     = ApplicationType.WEB,
                RS_BrowserName = MobileBrowserType.Safari,
                RS_DeviceGroup = "iOS;Tablet"
            };
            DriverCapabilities caps = new DriverCapabilities(p);

            Assert.AreEqual(MobileBrowserType.Safari, caps.GetDriverOptions().ToDictionary()[MobileCapabilityType.BrowserName], "Default browser name should be set as capability.");

            AdditionalDriverOptions additionalOptions = new AdditionalDriverOptions();

            additionalOptions
            .AddCapability("RS_DeviceGroup", "Android;phone")
            .AddCapability("RS_BrowserName", "Chrome");
            caps.MergeCapabilities(additionalOptions);
            Assert.AreEqual(p.RS_DeviceGroup, "Android;phone", "Device Group value should be overridden");
            Assert.AreEqual(p.RS_BrowserName, "Chrome", "Browser Name should be overridden");
            Assert.AreNotEqual(ApplicationType.NATIVE, p.RS_AppType, "Application Type runsettings parameter should not be overridden");
        }
Exemplo n.º 4
0
Arquivo: Driver.cs Projeto: basp/aegis
 public bool TestCapabilities(DriverCapabilities capabilities) =>
 throw new NotImplementedException();
Exemplo n.º 5
0
        //TODO: check what we can hide from here and move to GingerCore  -- all the communcation Payload stuff move from here

        public GingerNode(DriverCapabilities DriverCapabilities, IGingerService service)
        {
            //TODO: remove me!?
            mService = service;
        }
Exemplo n.º 6
0
 public void EmptyApplicationTypeParameterThrows()
 {
     Assert.Throws <InvalidCapabilityException>(() => {
         DriverCapabilities caps = new DriverCapabilities(new TestEnvironmentParameters());
     }, "ApplicationType is a manadatory parameter and cannot be null or empty");
 }
Exemplo n.º 7
0
        //TODO: check what we can hide from here and move to GingerCore  -- all the communcation Payload stuff move from here

        public GingerNode(DriverCapabilities DriverCapabilities, PluginDriverBase driver)
        {
            this.mDriver = driver;
        }