コード例 #1
0
        //[Test]
        public void TestDriver()
        {
            EggplantElement StartButton    = new EggplantElement(By.Image("MC65/System/StartMenu/StartButton"));
            EggplantElement ContactsButton = new EggplantElement(By.Text("Contacts"));
            EggplantElement CloseButton    = new EggplantElement(By.Image("MC65/System/StartMenu/ExitButton"));

            if (!ContactsButton.IsPresent())
            {
                StartButton.Click();
            }
            ContactsButton.Click();
            CloseButton.Click();
            StartButton.Click();
            CloseButton.Click();
        }
コード例 #2
0
        //[Test]
        public void TestByLocators()
        {
            Driver.Connect(Config.Host1Ip);
            var Element = new EggplantElement(By.Text("Run"));

            Element.Click();
        }
コード例 #3
0
        //[Test]
        public void TestElementSearchRectangle()
        {
            ConnectToHost1();

            EggplantElement Home    = new EggplantElement(By.Text("Home").InRectangle(SearchRectangle.TopQuarter));
            EggplantElement element = new EggplantElement(By.Image("MC65/System/StartMenu/ExitButton").InRectangle(SearchRectangle.BottomQuarter));

            Home.Click();
            element.Click();
        }
コード例 #4
0
        //[Test]
        public void TestElementByText()
        {
            EggplantElement element = new EggplantElement(By.Image("(Text:\"Text Of Element\")"));

            element.Click();
        }
コード例 #5
0
        //[Test]
        public void TestElementByPath()
        {
            EggplantElement element = new EggplantElement(By.Image("MC65/System/StartMenu/ExitButton"));

            element.Click();
        }