/// <summary> /// ResetDatabase_Test /// </summary> public void ResetDatabase_Test() { #region Variable Declarations HtmlHyperlink uIAdministrationHyperlink = this.UIIndexWindowsInternetWindow.UIIndexDocument.UIMainMenuCustom.UIAdministrationHyperlink; HtmlHyperlink uIResetDatabaseHyperlink = this.UIIndexWindowsInternetWindow.UIIndexDocument.UIMainMenuCustom.UIResetDatabaseHyperlink; HtmlDiv uIItemPane1 = this.UIIndexWindowsInternetWindow.UIHttplocalhost1745DatDocument.UIItemPane1; #endregion // Click 'Administration' link Mouse.Click(uIAdministrationHyperlink, new Point(42, 21)); // Click 'Reset Database' link Mouse.Click(uIResetDatabaseHyperlink, new Point(41, 13)); // The following element is no longer available: IE web control; Process Id [6628], window handle [1770822] // Set flag to allow play back to continue if non-essential actions fail. (For example, if a mouse hover action fails.) Playback.PlaybackSettings.ContinueOnError = true; // Mouse hover pane at (1, 1) Mouse.Hover(uIItemPane1, new Point(1, 1)); // The following element is no longer available: IE web control; Process Id [6628], window handle [1770822] // Reset flag to ensure that play back stops if there is an error. Playback.PlaybackSettings.ContinueOnError = false; }
/// <summary> /// AddToCart /// </summary> public void AddToCart() { #region Variable Declarations HtmlHyperlink uIBrakesHyperlink = this.UIShoppingCartPartsUnlWindow.UIShoppingCartPartsUnlDocument.UIBrakesHyperlink; HtmlHyperlink uIDiskandPadCombo2599SHyperlink = this.UIShoppingCartPartsUnlWindow.UIBrowseProductsPartsUDocument.UIDiskandPadCombo2599SHyperlink; HtmlImage uIImagesproduct_brakesImage = this.UIShoppingCartPartsUnlWindow.UIProductDiskandPadComDocument.UIProductimagePane.UIImagesproduct_brakesImage; HtmlCell uIDiameterCell = this.UIShoppingCartPartsUnlWindow.UIProductDiskandPadComDocument.UIStoredetailsPane.UIItemTable.UIDiameterCell; HtmlHyperlink uIAddtoCartHyperlink = this.UIShoppingCartPartsUnlWindow.UIProductDiskandPadComDocument.UIStoredetailsPane.UIAddtoCartHyperlink; #endregion // Click 'Brakes' link Mouse.Click(uIBrakesHyperlink, new Point(56, 32)); // Click 'Disk and Pad Combo 25,99 € Shop Now Disk and Pad ...' link Mouse.Click(uIDiskandPadCombo2599SHyperlink, new Point(299, 198)); // Set flag to allow play back to continue if non-essential actions fail. (For example, if a mouse hover action fails.) Playback.PlaybackSettings.ContinueOnError = true; // Mouse hover '/Images/product_brakes_disk-pad-combo.jpg' image at (1, 1) Mouse.Hover(uIImagesproduct_brakesImage, new Point(1, 1)); // Mouse hover 'Diameter' cell at (1, 1) Mouse.Hover(uIDiameterCell, new Point(1, 1)); // Reset flag to ensure that play back stops if there is an error. Playback.PlaybackSettings.ContinueOnError = false; // Click 'Add to Cart' link Mouse.Click(uIAddtoCartHyperlink, new Point(229, 27)); }
/// <summary> /// AddToCart2 /// </summary> public void AddToCart2() { #region Variable Declarations HtmlHyperlink uILightingHyperlink = this.UIShoppingCartPartsUnlWindow.UIBrowseProductsPartsUDocument.UILightingHyperlink; HtmlImage uIHalogenHeadlights2PaImage = this.UIShoppingCartPartsUnlWindow.UIBrowseProductsPartsUDocument1.UIHalogenHeadlights2PaImage; HtmlImage uIImagesproduct_lightiImage = this.UIShoppingCartPartsUnlWindow.UIProductHalogenHeadliDocument.UIProductimagePane.UIImagesproduct_lightiImage; HtmlCell uIWiringharnessincludeCell = this.UIShoppingCartPartsUnlWindow.UIProductHalogenHeadliDocument.UIStoredetailsPane.UIItemTable.UIWiringharnessincludeCell; HtmlHyperlink uIAddtoCartHyperlink = this.UIShoppingCartPartsUnlWindow.UIProductHalogenHeadliDocument.UIStoredetailsPane.UIAddtoCartHyperlink; #endregion // Click 'Lighting' link Mouse.Click(uILightingHyperlink, new Point(57, 17)); // Click 'Halogen Headlights (2 Pack) zoom' image Mouse.Click(uIHalogenHeadlights2PaImage, new Point(316, 238)); // Set flag to allow play back to continue if non-essential actions fail. (For example, if a mouse hover action fails.) Playback.PlaybackSettings.ContinueOnError = true; // Mouse hover '/Images/product_lighting_headlight.jpg' image at (1, 1) Mouse.Hover(uIImagesproduct_lightiImage, new Point(1, 1)); // Mouse hover 'Wiring harness included' cell at (1, 1) Mouse.Hover(uIWiringharnessincludeCell, new Point(1, 1)); // Reset flag to ensure that play back stops if there is an error. Playback.PlaybackSettings.ContinueOnError = false; // Click 'Add to Cart' link Mouse.Click(uIAddtoCartHyperlink, new Point(176, 46)); }
/// <summary> /// VerifyMyMetricsPageWorks /// </summary> public void VerifyMyMetricsPageWorks() { #region Variable Declarations HtmlDiv uICatchAllPane = this.UIMSNcomHotmailOutlookWindow.UIMSNcomHotmailOutlookDocument.UIEbAd32190459_billboaFrame.UIHTML5Billboard88x31tDocument.UICatchAllPane; HtmlIFrame uIEbAd32190459_billboaFrame = this.UIMSNcomHotmailOutlookWindow.UIMSNcomHotmailOutlookDocument.UIEbAd32190459_billboaFrame; HtmlHyperlink uIMyMetricsHyperlink = this.UIMSNcomHotmailOutlookWindow.UIMercuryHealthGroupMeDocument.UIMyMetricsHyperlink; #endregion // Set flag to allow play back to continue if non-essential actions fail. (For example, if a mouse hover action fails.) Playback.PlaybackSettings.ContinueOnError = true; // Mouse hover 'catchAll' pane at (1, 1) Mouse.Hover(uICatchAllPane, new Point(1, 1)); // Mouse hover 'ebAd32190459_billboard_iframe_32190459_93048926593...' frame at (1, 1) Mouse.Hover(uIEbAd32190459_billboaFrame, new Point(1, 1)); // Failed to record the object corresponding to this action. // Reset flag to ensure that play back stops if there is an error. Playback.PlaybackSettings.ContinueOnError = false; // Click 'My Metrics' link Mouse.Click(uIMyMetricsHyperlink, new Point(72, 39)); }
/// <summary> /// tests the event editing UI /// </summary> public void RecordedMethod1() { #region Variable Declarations HtmlInputButton uILogintocontinueButton = this.UIHomePageTrailMixInteWindow.UIHomePageTrailMixDocument.UILogintocontinueButton; HtmlEdit uIUsernameEdit = this.UIHomePageTrailMixInteWindow.UILoginTrailMixDocument.UIUsernameEdit; HtmlEdit uIPasswordEdit = this.UIHomePageTrailMixInteWindow.UILoginTrailMixDocument.UIPasswordEdit; HtmlInputButton uILoginButton = this.UIHomePageTrailMixInteWindow.UILoginTrailMixDocument.UILoginFormCustom.UILoginButton; HtmlHyperlink uIManageEventsHyperlink = this.UIHomePageTrailMixInteWindow.UIHomePageTrailMixDocument.UIManageEventsHyperlink; HtmlHyperlink uIEditHyperlink = this.UIHomePageTrailMixInteWindow.UIEventsTrailMixDocument.UIEditHyperlink; HtmlDiv uIItemPane = this.UIHomePageTrailMixInteWindow.UIEditTrailMixDocument.UIItemPane; HtmlEdit uIEventLocationEdit = this.UIHomePageTrailMixInteWindow.UIEditTrailMixDocument.UIEventLocationEdit; HtmlInputButton uISaveButton = this.UIHomePageTrailMixInteWindow.UIEditTrailMixDocument.UISaveButton; #endregion // Click 'Login to continue' button Mouse.Click(uILogintocontinueButton, new Point(177, 36)); // Type 'admin' in 'User name' text box uIUsernameEdit.Text = this.RecordedMethod1Params.UIUsernameEditText; // Type '********' in 'Password' text box uIPasswordEdit.Password = this.RecordedMethod1Params.UIPasswordEditPassword; // Click 'Log in' button Mouse.Click(uILoginButton, new Point(95, 27)); // Click 'Manage Events' link Mouse.Click(uIManageEventsHyperlink, new Point(255, 43)); // Click 'Edit' link Mouse.Click(uIEditHyperlink, new Point(9, 14)); // Set flag to allow play back to continue if non-essential actions fail. (For example, if a mouse hover action fails.) Playback.PlaybackSettings.ContinueOnError = true; // Mouse hover pane at (1, 1) Mouse.Hover(uIItemPane, new Point(1, 1)); // Reset flag to ensure that play back stops if there is an error. Playback.PlaybackSettings.ContinueOnError = false; // Type 'Mississauga' in 'eventLocation' text box uIEventLocationEdit.Text = this.RecordedMethod1Params.UIEventLocationEditText; // Type 'Mississauga1' in 'eventLocation' text box uIEventLocationEdit.Text = this.RecordedMethod1Params.UIEventLocationEditText1; // Click 'Save' button Mouse.Click(uISaveButton, new Point(86, 33)); }
/// <summary> /// OpenBrowser /// </summary> public void OpenBrowser() { #region Variable Declarations HtmlHyperlink uIHEALTHFITNESSHyperlink = this.UIMSNcomHotmailOutlookWindow.UIMSNcomHotmailOutlookDocument.UIMainCustom.UIHEALTHFITNESSHyperlink; #endregion // Set flag to allow play back to continue if non-essential actions fail. (For example, if a mouse hover action fails.) Playback.PlaybackSettings.ContinueOnError = true; // Mouse hover 'HEALTH & FITNESS' link at (1, 1) Mouse.Hover(uIHEALTHFITNESSHyperlink, new Point(1, 1)); // Failed to record the object corresponding to this action. // Reset flag to ensure that play back stops if there is an error. Playback.PlaybackSettings.ContinueOnError = false; }
/// <summary> /// addCar2 - Use 'addCar2Params' to pass parameters into this method. /// </summary> public void addCar2() { #region Variable Declarations HtmlHyperlink uIPojazdyHyperlink = this.UIIndexMyASPNETApplicaWindow.UIIndexMyASPNETApplicaDocument.UIBsexamplenavbarcollaPane.UIPojazdyHyperlink; HtmlDiv uIIndexCreateNewNameMoPane = this.UIIndexMyASPNETApplicaWindow.UIIndexMyASPNETApplicaDocument1.UIIndexCreateNewNameMoPane; HtmlHyperlink uICreateNewHyperlink = this.UIIndexMyASPNETApplicaWindow.UIIndexMyASPNETApplicaDocument1.UICreateNewHyperlink; HtmlEdit uIModelEdit = this.UIIndexMyASPNETApplicaWindow.UICreateMyASPNETApplicDocument.UIModelEdit; HtmlEdit uIRokprodukcjiEdit = this.UIIndexMyASPNETApplicaWindow.UICreateMyASPNETApplicDocument.UIRokprodukcjiEdit; HtmlEdit uIVinEdit = this.UIIndexMyASPNETApplicaWindow.UICreateMyASPNETApplicDocument.UIVinEdit; HtmlInputButton uICreateButton = this.UIIndexMyASPNETApplicaWindow.UICreateMyASPNETApplicDocument.UICreateButton; #endregion // Click 'Pojazdy' link Mouse.Click(uIPojazdyHyperlink, new Point(48, 34)); // Set flag to allow play back to continue if non-essential actions fail. (For example, if a mouse hover action fails.) Playback.PlaybackSettings.ContinueOnError = true; // Mouse hover 'Index Create New Name Model' pane at (1, 1) Mouse.Hover(uIIndexCreateNewNameMoPane, new Point(1, 1)); // Reset flag to ensure that play back stops if there is an error. Playback.PlaybackSettings.ContinueOnError = false; // Click 'Create New' link Mouse.Click(uICreateNewHyperlink, new Point(14, 5)); // Type 'opel' in 'Model' text box uIModelEdit.Text = this.addCar2Params.UIModelEditText; // Type '{Tab}' in 'Model' text box Keyboard.SendKeys(uIModelEdit, this.addCar2Params.UIModelEditSendKeys, ModifierKeys.None); // Type '2008' in 'Rok produkcji' text box uIRokprodukcjiEdit.Text = this.addCar2Params.UIRokprodukcjiEditText; // Type '{Tab}' in 'Rok produkcji' text box Keyboard.SendKeys(uIRokprodukcjiEdit, this.addCar2Params.UIRokprodukcjiEditSendKeys, ModifierKeys.None); // Type 'bndmioksndhg' in 'Vin' text box uIVinEdit.Text = this.addCar2Params.UIVinEditText; // Click 'Create' button Mouse.Click(uICreateButton, new Point(38, 24)); }
/// <summary> /// RecordedMethodCreate - Use 'RecordedMethodCreateParams' to pass parameters into this method. /// </summary> public void RecordedMethodCreate() { Playback.PlaybackSettings.LoggerOverrideState = HtmlLoggerState.AllActionSnapshot; #region Variable Declarations HtmlEdit uIFirstNameEdit = this.UIIndexCodedUItestautoWindow.UICreateCodedUItestautDocument.UIFirstNameEdit; HtmlEdit uILastNameEdit = this.UIIndexCodedUItestautoWindow.UICreateCodedUItestautDocument.UILastNameEdit; HtmlEdit uIEmailEdit = this.UIIndexCodedUItestautoWindow.UICreateCodedUItestautDocument.UIEmailEdit; HtmlEdit uIDateofBirthEdit = this.UIIndexCodedUItestautoWindow.UICreateCodedUItestautDocument.UIDateofBirthEdit; HtmlComboBox uIItemComboBox = this.UIIndexCodedUItestautoWindow.UICreateCodedUItestautDocument.UIUidatepickerdivPane.UIItemComboBox; HtmlHyperlink uIItem5Hyperlink = this.UIIndexCodedUItestautoWindow.UICreateCodedUItestautDocument.UIUidatepickerdivPane.UIItem5Hyperlink; HtmlInputButton uICreateButton = this.UIIndexCodedUItestautoWindow.UICreateCodedUItestautDocument.UICreateButton; HtmlHyperlink uIEmailAddressHyperlink = this.UIIndexCodedUItestautoWindow.UIIndexCodedUItestautoDocument.UIBobsmithsomedomaincoHyperlink; #endregion // Type 'Bob' in 'First Name' text box uIFirstNameEdit.Text = this.RecordedMethodCreateParams.UIFirstNameEditText; // Type '{Tab}' in 'First Name' text box Keyboard.SendKeys(uIFirstNameEdit, this.RecordedMethodCreateParams.UIFirstNameEditSendKeys, ModifierKeys.None); // Type 'Smith' in 'Last Name' text box uILastNameEdit.Text = this.RecordedMethodCreateParams.UILastNameEditText; // Type '{Tab}' in 'Last Name' text box Keyboard.SendKeys(uILastNameEdit, this.RecordedMethodCreateParams.UILastNameEditSendKeys, ModifierKeys.None); // Type '*****@*****.**' in 'Email' text box uIEmailEdit.Text = this.RecordedMethodCreateParams.UIEmailEditText; // Click 'Date of Birth' text box Mouse.Click(uIDateofBirthEdit, new Point(319, 29)); // Type '03/05/1996' in 'Date of Birth' text box uIDateofBirthEdit.Text = this.RecordedMethodCreateParams.UIDateOfBirthEditText; // Click 'Create' button Mouse.Click(uICreateButton, new Point(56, 27)); // Hover on email address link when the Index page reloads uIEmailAddressHyperlink.WaitForControlReady(); Mouse.Hover(uIEmailAddressHyperlink); }
public void CheckFeaturesExpectedResult() { this.treeName = "tVFeatures"; #region Variable Declarations WinComboBox uICBConversationsComboBox = this.UIONVIFClientTestToolWindow.UICBConversationsWindow.UICBConversationsComboBox; WinEdit uITBOutputEdit = this.UIONVIFClientTestToolWindow.UITBOutputWindow.UITBOutputEdit; WinTree uITVTestCasesTree = this.UIONVIFClientTestToolWindow.UITVTestCasesWindow.UITVTestCasesTree; WinTabPage uIFeaturesTabPage = this.UIONVIFClientTestToolWindow.UITCModesWindow.UIFeaturesTabPage; WinList uILVStepsList = this.UIONVIFClientTestToolWindow.UILVStepsWindow.UILVStepsList; #endregion if (test.featuresExpectedResult != null) { // Щелкните "Features" вкладка uIFeaturesTabPage.WaitForControlReady(); Mouse.Click(uIFeaturesTabPage); foreach (var featureExpectedResult in test.featuresExpectedResult) { mTree0 = featureExpectedResult.Key; this.mTreeItem = this.UIONVIFClientTestToolWindow.UITVTestCasesWindow.UIProfileSTestCasesTreeItem; //this.mTreeItem.(); mTreeItem.WaitForControlReady(); Mouse.Click(this.mTreeItem, new Point(0, 0)); Mouse.Hover(this.mTreeItem, new Point(this.mTreeItem.Width / 2, this.mTreeItem.Height / 2)); LogData logDataFeature = new LogData(); logDataFeature.testPath = testPath; logDataFeature.currentResult = featureExpectedResult.Key + " " + this.mTreeItem.ToolTipText; logDataFeature.expectedResult = featureExpectedResult.Key + " " + featureExpectedResult.Value; if (logDataFeature.currentResult == logDataFeature.expectedResult) { logDataFeature.result = "PASSED"; } else { logDataFeature.result = "FAILED"; } this.logDataFeatures.Add(logDataFeature); } } }
/// <summary> /// ReportIt - Use 'ReportItParams' to pass parameters into this method. /// </summary> public void ReportIt() { #region Variable Declarations HtmlDiv uIListofOpenIncidentsLPane = this.UIListofOpenIncidentsIWindow.UIListofOpenIncidentsDocument.UIListofOpenIncidentsLPane; BrowserWindow uIListofOpenIncidentsIWindow = this.UIListofOpenIncidentsIWindow; HtmlHyperlink uIIncidentsMapHyperlink = this.UIListofOpenIncidentsIWindow.UIListofOpenIncidentsDocument.UIIncidentsMapHyperlink; #endregion // Set flag to allow play back to continue if non-essential actions fail. (For example, if a mouse hover action fails.) Playback.PlaybackSettings.ContinueOnError = true; // Mouse hover 'List of Open Incidents Loading.' pane at (1, 1) Mouse.Hover(uIListofOpenIncidentsLPane, new Point(1, 1)); // Reset flag to ensure that play back stops if there is an error. Playback.PlaybackSettings.ContinueOnError = false; // Go to web page 'https://reportitunai.azurewebsites.net/' uIListofOpenIncidentsIWindow.NavigateToUrl(new System.Uri(this.ReportItParams.UIListofOpenIncidentsIWindowUrl)); // Click 'Incidents Map' link Mouse.Click(uIIncidentsMapHyperlink, new Point(68, 15)); }
/// <summary> /// InvokeItemDetailsPage /// </summary> public void InvokeItemDetailsPage() { #region Variable Declarations HtmlHeaderCell uINameCell = this.UIABCnetworksInventoryWindow.UIABCnetworksInventoryDocument2.UICtl00_ctl00_MainContTable.UINameCell; HtmlCell uIXenonCell = this.UIABCnetworksInventoryWindow.UIABCnetworksInventoryDocument2.UICtl00_ctl00_MainContTable1.UIXenonCell; HtmlHyperlink uIXenonHyperlink = this.UIABCnetworksInventoryWindow.UIABCnetworksInventoryDocument2.UIXenonHyperlink; #endregion // Set flag to allow play back to continue if non-essential actions fail. (For example, if a mouse hover action fails.) Playback.PlaybackSettings.ContinueOnError = true; // Mouse hover 'Name' cell at (1, 1) Mouse.Hover(uINameCell, new Point(1, 1)); // Mouse hover 'Xenon' cell at (1, 1) Mouse.Hover(uIXenonCell, new Point(1, 1)); // Reset flag to ensure that play back stops if there is an error. Playback.PlaybackSettings.ContinueOnError = false; uIXenonHyperlink.SearchProperties.Add("InnerText", "Xenon", PropertyExpressionOperator.EqualTo); // Click 'Xenon' link Mouse.Click(uIXenonHyperlink, new Point(14, 12)); }
/// <summary> /// RecordedMethod1 - 使用 'RecordedMethod1Params' 將參數傳入這個方法。 /// </summary> public void RecordedMethod1() { #region Variable Declarations HtmlEdit uI簽核流程名稱Edit = this.UI簽核流程範本管理新增InternetExWindow.UI簽核流程範本管理新增Document.UI簽核流程名稱Edit; HtmlEdit uI簽核流程範本管理新增Edit = this.UI簽核流程範本管理新增InternetExWindow.UI簽核流程範本管理新增Document.UI簽核流程範本管理新增Edit; HtmlDiv uI確定Pane = this.UI簽核流程範本管理新增InternetExWindow.UI簽核流程範本管理新增Document.UI確定Pane; HtmlHyperlink uIItemHyperlink = this.UI簽核流程範本管理新增InternetExWindow.UI簽核流程範本管理新增Document.UIS2id_ContentIDPane.UIItemHyperlink; HtmlDiv uI人員請假作業Pane = this.UI簽核流程範本管理新增InternetExWindow.UI簽核流程範本管理新增Document.UISelect2dropPane.UI人員請假作業Pane; HtmlDiv uI流程描述模式固定層級必簽層級Pane = this.UI簽核流程範本管理新增InternetExWindow.UI簽核流程範本管理新增Document.UISfttilePane.UI流程描述模式固定層級必簽層級Pane; HtmlRadioButton uIIsSetConditionRadioButton = this.UI簽核流程範本管理新增InternetExWindow.UI簽核流程範本管理新增Document.UIIsSetConditionRadioButton; HtmlDiv uI若要變更設定條件將刪除此範本目前所設定的Pane = this.UI簽核流程範本管理新增InternetExWindow.UI簽核流程範本管理新增Document.UI若要變更設定條件將刪除此範本目前所設定的Pane; HtmlButton uI確認Button = this.UI簽核流程範本管理新增InternetExWindow.UI簽核流程範本管理新增Document.UI確認Button; HtmlDiv uIItemPane = this.UI簽核流程範本管理新增InternetExWindow.UI簽核流程範本管理新增Document.UIItemPane; HtmlDiv uI簽核流程設定Pane = this.UI簽核流程範本管理新增InternetExWindow.UI簽核流程範本管理新增Document.UISfttilePane.UI簽核流程設定Pane; #endregion // 在 '簽核流程名稱' 文字方塊 中輸入 '請假Test' uI簽核流程名稱Edit.Text = this.RecordedMethod1Params.UI簽核流程名稱EditText; // 按一下 '簽核流程範本管理-新增' 文字方塊 Mouse.Click(uI簽核流程範本管理新增Edit, new Point(231, 27)); // 按一下 '確定' 窗格 Mouse.Click(uI確定Pane, new Point(40, 18)); // 按一下 連結 Mouse.Click(uIItemHyperlink, new Point(97, 14)); // 按一下 '人員請假作業' 窗格 Mouse.Click(uI人員請假作業Pane, new Point(142, 16)); // 設定旗標,以允許非必要動作失敗時 (例如,滑鼠停留動作失敗時) 能夠繼續播放。 Playback.PlaybackSettings.ContinueOnError = true; // 滑鼠停留 '流程描述 模式 固定層級 必簽層級' 窗格 於 (1, 1) Mouse.Hover(uI流程描述模式固定層級必簽層級Pane, new Point(1, 1)); // 重設旗標,以確保發生錯誤時播放會停止。 Playback.PlaybackSettings.ContinueOnError = false; // 選取 'IsSetCondition' 選項按鈕 uIIsSetConditionRadioButton.Selected = this.RecordedMethod1Params.UIIsSetConditionRadioButtonSelected; // 設定旗標,以允許非必要動作失敗時 (例如,滑鼠停留動作失敗時) 能夠繼續播放。 Playback.PlaybackSettings.ContinueOnError = true; // 滑鼠停留 '× 若要變更設定條件,將刪除此範本目前所設定的簽核流程。 取消確認' 窗格 於 (1, 1) Mouse.Hover(uI若要變更設定條件將刪除此範本目前所設定的Pane, new Point(1, 1)); // 重設旗標,以確保發生錯誤時播放會停止。 Playback.PlaybackSettings.ContinueOnError = false; // 按一下 '確認' 按鈕 Mouse.Click(uI確認Button, new Point(20, 10)); // 設定旗標,以允許非必要動作失敗時 (例如,滑鼠停留動作失敗時) 能夠繼續播放。 Playback.PlaybackSettings.ContinueOnError = true; // 滑鼠停留 '× 若要變更設定條件,將刪除此範本目前所設定的簽核流程。 取消確認' 窗格 於 (1, 1) Mouse.Hover(uI若要變更設定條件將刪除此範本目前所設定的Pane, new Point(1, 1)); // 滑鼠停留 窗格 於 (1, 1) Mouse.Hover(uIItemPane, new Point(1, 1)); // 重設旗標,以確保發生錯誤時播放會停止。 Playback.PlaybackSettings.ContinueOnError = false; // 按一下 '簽核流程設定' 窗格 Mouse.Click(uI簽核流程設定Pane, new Point(1306, 23)); //客製程式 //建立 HtmlDocument 物件,讓命名好看一點 HtmlDocument UIBrowser = this.UI簽核流程範本管理新增InternetExWindow.UI簽核流程範本管理新增Document; //產生輸入框物件 HtmlEdit InputGroupName = new HtmlEdit(UIBrowser); string CusDefInput = string.Format("{0}=\"{1}\"", "data-id", "group-desc"); InputGroupName.SearchProperties.Add(new PropertyExpression(HtmlControl.PropertyNames.ControlDefinition, CusDefInput, PropertyExpressionOperator.Contains)); InputGroupName.Text = "Hello"; Assert.AreEqual("Yahoo", InputGroupName.Text, "is not Yahoo"); Playback.Wait(1000); //產生新增按鈕物件 HtmlButton AddGroupBtn = new HtmlButton(UIBrowser); string CusDefButton = string.Format("{0}=\"{1}\"", "data-field", "btnAddGroupBox"); AddGroupBtn.SearchProperties.Add(new PropertyExpression(HtmlControl.PropertyNames.ControlDefinition, CusDefButton, PropertyExpressionOperator.Contains)); Mouse.Click(AddGroupBtn); }