コード例 #1
0
        /// <summary>
        /// verify operation available
        /// </summary>
        public void VerifyOperationAvailable()
        {
            OperationAvailable.Wait(3);
            IList <IWebElement> list;

            if (Driver.GetType() == typeof(DummyDriver))
            {
                DummyWebElement dummy1 = new DummyWebElement();
                dummy1.Text = Data.OperationToAdd;
                OperationAvailable.FakeOptionsList = new List <IWebElement> {
                    dummy1
                };
            }
            list = OperationAvailable.Options;
            bool isFound = false;

            foreach (var webElement in list)
            {
                Report.Write("OperationAvailable value: " + webElement.GetAttribute("value") + "; text: " + webElement.Text);
                if (webElement.Text.Equals(Data.OperationToAdd))
                {
                    isFound = true;
                }
            }
            Assert.IsTrue(isFound, "Verified the operation '" + Data.OperationToAdd + "' is not available.");
        }
コード例 #2
0
 /// <summary>
 /// add operation
 /// </summary>
 public void AddOperation()
 {
     OperationAvailable.SelectByText(Data.OperationToAdd);
     AddArrow.Click();
     this.DriverCommands.WaitAndMeasurePageLoadTime();
     InitElements();
 }