public void Collapse() { if (!AccessibleIsEnabled(accessible)) { throw new ElementNotEnabledException(); } if (accessible.StateSet.Contains(StateType.Expanded)) { action.DoAction(expandOrContractAction); } }
public void Toggle() { if (!accessible.StateSet.Contains(StateType.Enabled)) { throw new ElementNotEnabledException(); } ActionDescription [] actions = action.Actions; for (int i = 0; i < actions.Length; i++) { if (actions [i].Name == "toggle") { action.DoAction(i); return; } } Log.Debug("Toggle: Couldn't find a toggle action"); action.DoAction(0); }
public void Invoke() { if (!accessible.StateSet.Contains(StateType.Enabled)) { throw new ElementNotEnabledException(); } ActionDescription [] actions = action.Actions; for (int i = 0; i < actions.Length; i++) { if (actions [i].Name == "activate" || actions [i].Name == "invoke" || actions [i].Name == "click" || actions [i].Name == "jump") { action.DoAction(i); return; } } Log.Debug("Invoke: Couldn't find an activate, invoke, or click action"); action.DoAction(0); }