Ejemplo n.º 1
0
        public void TestDriverKey()
        {
            Log.Info("1. Navigate to google");
            DriverUtils.GoToUrl("https://www.google.com");
            Log.Info("2. Search a text");
            var txtSearch = new BaseElement("name={0}");

            txtSearch.Format("q").SendKeys("Hello Selenium");
            WaitHelper.WaitUntil(() => txtSearch.Format("q").Value.Equals("444"), TimeSpan.FromSeconds(4),
                                 TimeSpan.FromSeconds(2));

            var properties = new DriverProperties(Constants.CONFIG_FILE_PATH, "local-chrome");

            Log.Info("3. Create a new driver");
            DriverUtils.CreateDriver(properties, "new chrome");

            DriverUtils.GoToUrl("https://www.seleniumhq.org/");

            DriverUtils.SwitchDriverTo();

            txtSearch.Format("q").SendKeys("Hello LogiGear");
            Assert.IsTrue(true, "Log this if false 1");
            bool abc = false;

            abc.Should().BeTrue("I don't know");
        }
Ejemplo n.º 2
0
        public DriverProperties GetProperties()
        {
            if (driverProps == null)
            {
                driverProps = new DriverProperties
                {
                    Author          = "Mad Ninja",
                    Blurb           = "Simple Driver for HUE bulbs",
                    CurrentVersion  = new ReleaseNumber(1, 0, 0, 1004),
                    GitHubLink      = "https://github.com/SimpleLed/Driver.PhillipsHue",
                    Id              = Guid.Parse("14e1f193-5e17-4e56-82ce-6a3f8f282020"),
                    IsPublicRelease = false,
                    IsSource        = false,
                    SupportsPull    = false,
                    SupportsPush    = true
                };
            }

            return(driverProps);
        }