public UiItemShimBase Button(string text) { Trace_i("Finding ‹Button› “{0}”...", text); Button b; try { b = Window1.Get <Button>(SearchCriteria.ByText(text)); } catch (Exception ex) { return(Error_o_ <UiItemShimBase>(null, "‹Button› not found." + L.F + ex.Details(false, false))); } if (b == null) { return(Warn_o_ <UiItemShimBase>(null, "‹Button› not found.")); } var shim = new WhiteItemShim(b); shim.Text = text; return(Trace_o_(shim, "‹Button› found. [id: {0}]", shim.Id)); }
public UiItemShimBase Button(string text) { Trace_i("Finding ‹Button› “{0}”...", text); Button b; try { b = Window1.Get<Button>(SearchCriteria.ByText(text)); } catch (Exception ex) { return Error_o_<UiItemShimBase>(null, "‹Button› not found." + L.F + ex.Details(false, false)); } if (b == null) return Warn_o_<UiItemShimBase>(null, "‹Button› not found."); var shim = new WhiteItemShim(b); shim.Text = text; return Trace_o_(shim, "‹Button› found. [id: {0}]", shim.Id); }