/// <summary> /// BackButton - Use 'BackButtonExpectedValues' to pass parameters into this method. /// </summary> public void BackButton() { #region Variable Declarations HtmlButton uIBackButton = this.UIInstallationWizardWindow.UIItemClient.UISignupWizardEngineDocument.UIBackButton; #endregion uIBackButton.WaitForControlExist(); // Verify that 'Back' button's property 'Id' contains 'idButtonBack' //StringAssert.Contains(uIBackButton.Id, this.BackButtonExpectedValues.UIBackButtonId); }
public static void ClickButton(string btnName, string btnType) { HtmlButton Btn = new HtmlButton(browserWindow); Btn.SearchProperties.Add(HtmlEdit.PropertyNames.Type, btnType, PropertyExpressionOperator.EqualTo); Btn.SearchProperties.Add(HtmlEdit.PropertyNames.InnerText, btnName, PropertyExpressionOperator.EqualTo); Btn.WaitForControlExist(); Mouse.Click(Btn); }
/// <summary> /// NextDownload - Use 'NextDownloadExpectedValues' to pass parameters into this method. /// </summary> public void NextDownload() { #region Variable Declarations HtmlButton uINextButton = this.UIInstallationWizardWindow.UIItemClient.UISignupWizardEngineDocument.UINextButton; #endregion uINextButton.WaitForControlExist(); Mouse.Click(uINextButton); System.Threading.Thread.Sleep(25000); // Verify that 'Next' button's property 'Id' contains 'idButtonNext' // StringAssert.Contains(uINextButton.Id, this.NextDownloadExpectedValues.UINextButtonId); }
// To click HTML button accepting two property [Using TryGetClickablePoint Method] public void clickHTMLButtonCollectionTwoProp(string strControl) { Keywords KeyFound = reader.FindControlinList(strControl); BrowserWindow _browser = new BrowserWindow(); HtmlButton _htmlButton = new HtmlButton(_browser); _htmlButton.SearchProperties[KeyFound.PropertyName1] = KeyFound.PropertyValue1; _htmlButton.SearchProperties[KeyFound.PropertyName2] = KeyFound.PropertyValue2; _htmlButton.WaitForControlExist(); int c = _htmlButton.FindMatchingControls().Count; var matchingControls = _htmlButton.FindMatchingControls(); for (int i = 0; i < c; i++) { if (matchingControls[i].TryGetClickablePoint(out pt)) { Mouse.Click(matchingControls[i]); break; } } }