private void ExecuteCondition(Func <RWebElement, bool> condition, string conditionName) { var wait = _automationManager.DefaultWait(_rWebElement); wait.Message = $"Failed to get condition: {_expression.Condition.Description} {conditionName}"; wait.Until(condition); }
private void ExecuteCondition(Func <string, string, bool> condition, string expected, string propertyName) { var wait = _automationManager.DefaultWait(_condition); wait.Until(x => { var actual = x.Expression(); wait.Message = $"Failed to get condition: {_condition.Condition.Description} {propertyName}: {expected}. Actual: {actual} "; return(condition(actual.ToString(), expected)); }); }
public RWebElementCollection WaitNotZero(bool throwEx = false) { try { _automationManager.DefaultWait(this).Until(x => x.Count > 0); } catch (Exception e) { if (throwEx) { throw; } } return(this); }