Пример #1
0
        /// <summary>
        /// Set the Value of filter
        /// </summary>
        /// <param name="column">Column number</param>
        /// <param name="value">Value of Filter</param>
        public void SetFilterCell(string column, string value)
        {
            AppiumWebElement headerCell = _table.FindElementByName(column);

            SetCellVisible(headerCell);

            AppiumWebElement filterCell = _table.FindElementByXPath($"//Custom[@Name='Filter Row']/DataItem[starts-with(@Name, '{column}')]");

            filterCell.SetValue(value);
        }
Пример #2
0
        public static (AppiumWebElement close, AppiumWebElement minimize, AppiumWebElement maximize) GetChromeButtons(this AppiumWebElement window)
        {
            if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
            {
                var closeButton      = window.FindElementByXPath("//XCUIElementTypeButton[1]");
                var fullscreenButton = window.FindElementByXPath("//XCUIElementTypeButton[2]");
                var minimizeButton   = window.FindElementByXPath("//XCUIElementTypeButton[3]");
                return(closeButton, minimizeButton, fullscreenButton);
            }

            throw new NotSupportedException("GetChromeButtons not supported on this platform.");
        }
Пример #3
0
        protected static AppiumWebElement PowerToysTrayButton()
        {
            WindowsElement   notificationOverflow = session.FindElementByName("Notification Overflow");
            AppiumWebElement overflowArea         = notificationOverflow.FindElementByName("Overflow Notification Area");
            AppiumWebElement powerToys            = overflowArea.FindElementByXPath("//Button[contains(@Name, \"PowerToys\")]");

            return(powerToys);
        }