Exemplo n.º 1
0
 /// <summary>
 /// Selects the given document ID.
 /// </summary>
 public void SelectFirstDocument(string documentValue)
 {
     if (Convert.ToInt32(_engine.ExecuteFunction("CheckElementUsingClassIndex", "checkbox")) > 0)
     {
         _engine.PressElementByClassIndex("checkbox", 0);
     }
     else if (Convert.ToInt32(_engine.ExecuteFunction("CheckElementUsingClassIndex", "hp-listitem-icon hp-listitem-image lg")) > 0)
     {
         _engine.PressElementByClassIndex("hp-listitem-icon hp-listitem-image lg", 0);
     }
     else if (Convert.ToInt32(_engine.ExecuteFunction("CheckElementUsingClassIndex", "hp-listitem-icon hp-listitem-image xl")) > 0)
     {
         _engine.PressElementByClassIndex("hp-listitem-icon hp-listitem-image xl", 0);
     }
     else if (Convert.ToInt32(_engine.ExecuteFunction("CheckElementUsingClassIndex", "hp-listitem hp-listitem-with-title")) > 0)
     {
         _engine.PressElementByClassIndex("hp-listitem hp-listitem-with-title", 0);
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Presses the HPCR button by its index value based on number of buttons on form.
 /// </summary>
 /// <param name="btnIndex">Index of the BTN.</param>
 /// <param name="trys">Recursive parameter used to keep track of retries before throwing</param>
 private void PressHpcrButtonByCoordinate(int btnIndex, int trys = 0)
 {
     try
     {
         _engine.PressElementByClassIndex("button", btnIndex);
     }
     catch (Exception ex)
     {
         UpdateStatus(ex.Message);
         if (ex.Message.Contains("UIContextId") && trys < 3)
         {
             PressHpcrButtonByCoordinate(btnIndex, ++trys);
         }
         else
         {
             throw;
         }
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Presses a button on the control panel.
        /// </summary>
        /// <param name="classId">The class ID</param>
        /// <param name="idx">The index</param>

        public void PressButtonByClass(string classId, int idx)
        {
            _engine.PressElementByClassIndex(classId, idx);
        }
Exemplo n.º 4
0
 /// <summary>
 /// Presses the folder (next) button.
 /// </summary>
 /// <param name="btnIndex">Index of the BTN.</param>
 private void PressFolderButton(int btnIndex = 0)
 {
     _engine.PressElementByClassIndex("button", btnIndex);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Presses a button on the control panel.
 /// </summary>
 /// <param name="id">The id of the button to press</param>
 /// <param name="index">Then index of the button to press</param>
 public void PressButtonByClassIndex(string id, int index)
 {
     _engine.PressElementByClassIndex(id, index);
 }