public void DismissNotification() { try { AppiumWebElement newNotification = DesktopSession.FindElementByName("New notification"); Assert.IsTrue(newNotification.FindElementByAccessibilityId("MessageText").Text.Contains(NewAlarmName)); newNotification.FindElementByName("Dismiss").Click(); } catch { } }
public CheckBoxMeta(AppiumWebElement window, string englishText, string valueName, bool isInverse, bool isGlobalOnly, bool isV2Property, NativeMethods.Wtypes.PROPERTYKEY?propKey) : this() { this.Box = window.FindElementByName(englishText); this.ValueName = valueName; this.IsInverse = isInverse; this.IsGlobalOnly = isGlobalOnly; this.IsV2Property = isV2Property; this.PropKey = propKey; }
protected override void PopulateItemsOnNavigate(AppiumWebElement propWindow) { this.GlobalV1V2Box = new CheckBoxMeta(propWindow, "Use legacy console (requires relaunch)", "ForceV2", false, true, false, NativeMethods.WinConP.PKEY_Console_ForceV2); this.Checkboxes = new List <CheckBoxMeta>(); this.Checkboxes.Add(new CheckBoxMeta(propWindow, "Enable line wrapping selection", "LineSelection", false, false, true, NativeMethods.WinConP.PKEY_Console_LineSelection)); this.Checkboxes.Add(new CheckBoxMeta(propWindow, "Filter clipboard contents on paste", "FilterOnPaste", false, false, true, NativeMethods.WinConP.PKEY_Console_FilterOnPaste)); this.Checkboxes.Add(new CheckBoxMeta(propWindow, "Enable Ctrl key shortcuts", "CtrlKeyShortcutsDisabled", true, false, true, NativeMethods.WinConP.PKEY_Console_CtrlKeysDisabled)); this.Checkboxes.Add(new CheckBoxMeta(propWindow, "Extended text selection keys", "ExtendedEditKey", false, true, false, null)); this.Checkboxes.Add(new CheckBoxMeta(propWindow, "Use Ctrl+Shift+C/V as Copy/Paste", "InterceptCopyPaste", false, false, true, NativeMethods.WinConP.PKEY_Console_InterceptCopyPaste)); this.MoreInfoLink = propWindow.FindElementByName("new console features"); }
public void PowerToysExit() { //open PowerToys context menu trayButton.Click(); isTrayOpened = true; WindowsElement notificationOverflow = session.FindElementByName("Notification Overflow"); AppiumWebElement overflowArea = notificationOverflow.FindElementByName("Overflow Notification Area"); AppiumWebElement powerToys = overflowArea.FindElementByName("PowerToys"); Assert.IsNotNull(powerToys); new Actions(session).MoveToElement(powerToys).ContextClick().Perform(); ShortWait(); //exit session.FindElementByXPath("//MenuItem[@Name=\"Exit\"]").Click(); ShortWait(); //check PowerToys exited powerToys = null; try { notificationOverflow = session.FindElementByName("Notification Overflow"); overflowArea = notificationOverflow.FindElementByName("Overflow Notification Area"); powerToys = overflowArea.FindElementByName("PowerToys"); } catch (OpenQA.Selenium.WebDriverException) { //expected, PowerToys shouldn't be here } LaunchPowerToys(); ShortWait(); Assert.IsNull(powerToys); }
public static void SetDialog(out AppiumWebElement dialog, string dialogName, bool isCheckSelect) { dialog = jupiter.FindElementByName(dialogName); if (isCheckSelect) { try { dialog.FindElementByName(">").Click(); } catch { logger.Info("Selection List Already Opened"); } } }
/// <summary> /// Get value of cell /// </summary> /// <param name="column">Column number</param> /// <param name="row">Row number </param> /// <returns> Returns string value of cell</returns> public string GetCellValue(string column, int row) { AppiumWebElement headerCell = _table.FindElementByName(column); SetCellVisible(headerCell); AppiumWebElement filterCell = _table.FindElementByName(column + " row " + row); return(filterCell.Text); }