コード例 #1
0
 /// <summary>
 /// Selects the folder quickset with the specified name.
 /// <param name="quickSetName">Name of the Quickset</param>
 /// </summary>
 public void SelectQuickSet(string quickSetName)
 {
     _controlPanel.ScrollPressWait(".hp-load-quickset-button", "#hpid-quicksets-list");
     Pacekeeper.Sync();
     if (_controlPanel.CheckState(".hp-listitem:contains(" + quickSetName + ")", OmniElementState.Exists))
     {
         string fileTypeItemSelector = ".hp-listitem-text:contains(" + quickSetName + ")";
         int    matches = _controlPanel.GetCount(fileTypeItemSelector);
         PressQuickSetItem(quickSetName, fileTypeItemSelector, matches);
         Pacekeeper.Sync();
         _controlPanel.Press("#hpid-quicksets-load-button");
         Pacekeeper.Sync();
     }
     else
     {
         throw new DeviceWorkflowException($"Could not find quickset with text '{quickSetName}'.");
     }
 }
コード例 #2
0
 /// <summary>
 /// Gets attribute of TopmostScreen.
 /// </summary>
 /// <returns></returns>
 protected string GetTopmostScreen()
 {
     if (_controlPanel.GetCount(_topViewAttribute) > 1)
     {
         return("Multiple screens");
     }
     else if (_controlPanel.CheckState($"{_topViewAttribute}[id]", OmniElementState.Exists))
     {
         return(_controlPanel.GetValue($"{_topViewAttribute}[id]", "id", OmniPropertyType.Property));
     }
     else if (_controlPanel.CheckState($"{_topViewAttribute}[class]", OmniElementState.Exists))
     {
         return(_controlPanel.GetValue($"{_topViewAttribute}[class]", "class", OmniPropertyType.Property));
     }
     else
     {
         return(null);
     }
 }