Ejemplo n.º 1
0
 public static void WaitForVisiblityAndClickOrAbortHotkeyEvent(this IRenderController renderController, string path,
                                                               int maxWaitTimeMs = 2000, int intervalMs = 25, bool leftClick = true)
 {
     WaitForConditionOrAbortHotkeyEvent(() => renderController.IsUiElementVisible(path), maxWaitTimeMs, intervalMs);
     if (leftClick)
     {
         renderController.GetOrRegisterAndGetUiElement(path).Click();
     }
     else
     {
         renderController.GetOrRegisterAndGetUiElement(path).RightClick();
     }
 }
        public static bool IsUiElementVisible(this IRenderController renderController, string path)
        {
            var uiElement = renderController.GetOrRegisterAndGetUiElement(path);

            return(!(uiElement is null) && uiElement.Visible);
        }