/// <summary> /// Method for Adding RedFlag Details /// </summary> /// <param name="RedFlag"></param> public void AddRefFlagDetails() { MouseKeyBoardSimulator objChars = new MouseKeyBoardSimulator(); System.Threading.Thread.Sleep(1000); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); DdlRedFlagItemAdd.Focus(); DdlRedFlagItemAdd.ExtendedMouseClick(); DdlRedFlagItemAdd.SelectByText("Chemical Consumption", true); System.Threading.Thread.Sleep(2000); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); DdlLocationAdd.Focus(); DdlLocationAdd.ExtendedMouseClick(); DdlLocationAdd.SelectByIndex(1); System.Threading.Thread.Sleep(200); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); TxtMinimumRangeAdd.ExtendedMouseClick(); objChars.SetNumeric("15"); System.Threading.Thread.Sleep(200); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); TxtMaximumRangeAdd.ExtendedMouseClick(); objChars.SetNumeric("25"); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); System.Threading.Thread.Sleep(2000); BtnSaveAdd.Focus(); BtnSaveAdd.DeskTopMouseClick(); //MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Enter); }
/// <summary> /// Inline Editing and Updating the Records from Red Flag Gridview /// </summary> /// <param name="InlineEditRedFlag"></param> public void InlineEditRedFlag() { Thread.Sleep(2000); MouseKeyBoardSimulator objKeyPress = new MouseKeyBoardSimulator(); objKeyPress.KeyPress(System.Windows.Forms.Keys.Tab); Thread.Sleep(1000); TxtMinRangeInlineEdit.Value = ""; TxtMinRangeInlineEdit.Focus(); TxtMinRangeInlineEdit.MouseClick(); objKeyPress.SetNumeric("15"); objKeyPress.KeyPress(System.Windows.Forms.Keys.Tab); Thread.Sleep(1000); TxtMaxRangeInlineEdit.Value = ""; TxtMaxRangeInlineEdit.Focus(); TxtMaxRangeInlineEdit.MouseClick(); objKeyPress.SetNumeric("30"); }
/// <summary> /// Updates the chemicals data /// </summary> public void UpdateChemicalsData(string updateCost) { Thread.Sleep(1000); MouseKeyBoardSimulator objKeyPress = new MouseKeyBoardSimulator(); objKeyPress.KeyPress(System.Windows.Forms.Keys.Tab); TxtCostEditUpdate.Value = ""; TxtCostEditUpdate.Focus(); TxtCostEditUpdate.MouseClick(); objKeyPress.SetNumeric(updateCost); objKeyPress.KeyPress(System.Windows.Forms.Keys.Tab); ChkIncludeCIEditUpdate.Checked = true; }
public void CancelLaborCost(string[] setLaborCost) { MouseKeyBoardSimulator objNumeric = new MouseKeyBoardSimulator(); HtmlInputControl ctrls = NormalCost; ctrls.Focus(); ctrls.Value = string.Empty; ctrls.MouseClick(); objNumeric.SetNumeric(setLaborCost[0]); BtnCancel.Focus(); BtnCancel.DeskTopMouseClick(); Thread.Sleep(3000); }
public bool UpdateWasherDetails(string[] SetValues) { MouseKeyBoardSimulator objSimulator = new MouseKeyBoardSimulator(); Thread.Sleep(3000); if (DdlController.ChildNodes.Count > 1) { DdlModel.Focus(); DdlModel.SelectByIndex(1); DdlModel.MouseClick(); KeyBoardSimulator.KeyDown(Keys.Select); KeyBoardSimulator.KeyPress(Keys.Enter); } else { return false; } if(DdlController.ChildNodes.Count > 1) { DdlController.Focus(); DdlController.SelectByIndex(1); DdlWasherMode.Focus(); KeyBoardSimulator.KeyDown(Keys.Select); KeyBoardSimulator.KeyPress(Keys.Enter); } else { return false; } TxtName.Focus(); TxtName.Text = string.Empty; objSimulator.SetText(SetValues[0]); TxtPlantWasher.Focus(); TxtPlantWasher.Text = string.Empty; TxtPlantWasher.TypeText(SetValues[1]); TxtProgramNo.Focus(); TxtProgramNo.Text = string.Empty; objSimulator.SetNumeric(SetValues[2]); Thread.Sleep(2000); BtnSaveTunnel.Focus(); BtnSaveTunnel.DeskTopMouseClick(); return true; }
/// <summary> /// Inline Editing and Updating the Records from Chemicals Gridview /// </summary> /// <param name="InlineEditChemicalsGrid"></param> public void InlineEditChemicalsGrid(string cost) { MouseKeyBoardSimulator objKeyPress = new MouseKeyBoardSimulator(); objKeyPress.KeyPress(System.Windows.Forms.Keys.Tab); Thread.Sleep(1000); TxtCostInlineEdit.Value = ""; TxtCostInlineEdit.Focus(); TxtCostInlineEdit.MouseClick(); objKeyPress.SetNumeric(cost); Thread.Sleep(1000); objKeyPress.KeyPress(System.Windows.Forms.Keys.Tab); ChkIncludeCiInlineEdit.Checked = true; }
/// <summary> /// Inline editing contact details /// </summary> /// <param name="EditUpdateInLineDetails"></param> public void EditUpdateInlineContactDetails(string[] editContactList) { MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); MouseKeyBoardSimulator objKeyPress = new MouseKeyBoardSimulator(); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); DdlPositionInlineEdit.Value = string.Empty; DdlPositionInlineEdit.ExtendedMouseClick(); objKeyPress.SetText(editContactList[3]); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Select); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); TxtOffPhoneInlineEdit.Value = string.Empty; TxtOffPhoneInlineEdit.ExtendedMouseClick(); objKeyPress.SetNumeric(editContactList[5]); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); TxtMobPhoneInlineEdit.Value = string.Empty; TxtMobPhoneInlineEdit.ExtendedMouseClick(); objKeyPress.SetNumeric(editContactList[6]); HtmlInputText txtEmail = TxtEmailAdrsInlineEdit; string[] splitEmailId = editContactList[4].Split('@'); txtEmail.Focus(); txtEmail.Value = string.Empty; txtEmail.Text = splitEmailId[0] + "@"; txtEmail.ExtendedMouseClick(); objKeyPress.SetText(splitEmailId[1]); Thread.Sleep(2000); }
/// <summary> /// Updates the Contact details on Edit popup /// </summary> /// <returns></returns> public void UpdateContactDetails(string[] contactList) { MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); MouseKeyBoardSimulator objKeyPress = new MouseKeyBoardSimulator(); TxtTitleUpdateControl.Focus(); TxtTitleUpdateControl.Value = string.Empty; TxtTitleUpdateControl.ExtendedMouseClick(); objKeyPress.SetText(contactList[0]); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); TxtFirstNmeUpdateControl.Value = string.Empty; TxtFirstNmeUpdateControl.ExtendedMouseClick(); objKeyPress.SetText(contactList[1]); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); TxtLastNmeUpdateControl.Value = string.Empty; TxtLastNmeUpdateControl.ExtendedMouseClick(); objKeyPress.SetText(contactList[2]); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); DdlPosUpdateControl.ExtendedMouseClick(); objKeyPress.SetText(contactList[3]); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); TxtOffPhoneUpdateControl.Value = string.Empty; TxtOffPhoneUpdateControl.ExtendedMouseClick(); objKeyPress.SetNumeric(contactList[5]); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); TxtMobPhoneUpdateControl.Value = string.Empty; TxtMobPhoneUpdateControl.ExtendedMouseClick(); objKeyPress.SetNumeric(contactList[6]); HtmlInputText txtEmail = TxtEmailAdrsUpdateControl; string[] splitEmailId = contactList[4].Split('@'); txtEmail.Focus(); txtEmail.Value = string.Empty; txtEmail.Text = splitEmailId[0] + "@"; txtEmail.ExtendedMouseClick(); objKeyPress.SetText(splitEmailId[1]); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); TxtFaxUpdateControl.Value = string.Empty; TxtFaxUpdateControl.MouseClick(); objKeyPress.SetNumeric(contactList[7]); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); Thread.Sleep(2000); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Enter); }
/// <summary> /// Cancel Contact Details after entering and verify in gridview for that record existance.. /// </summary> /// <param name="contactList"></param> public void CancelAddContactDetails(string[] contactList) { MouseKeyBoardSimulator objChars = new MouseKeyBoardSimulator(); System.Threading.Thread.Sleep(1000); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); TxtTitleAdd.Focus(); TxtTitleAdd.ExtendedMouseClick(); objChars.SetText(contactList[0]); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); TxtFirstNameAdd.ExtendedMouseClick(); objChars.SetText(contactList[1]); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); TxtLastNameAdd.ExtendedMouseClick(); objChars.SetText(contactList[2]); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); System.Threading.Thread.Sleep(3000); DdlPositionAdd.ExtendedMouseClick(); DdlPositionAdd.SelectByIndex(1); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); TxtOfficePhoneAdd.ExtendedMouseClick(); objChars.SetNumeric(contactList[5]); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); TxtMobilePhoneAdd.ExtendedMouseClick(); objChars.SetNumeric(contactList[6]); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); HtmlInputText txtEmailId = TxtEmailAdd; string[] splitEmailId = contactList[4].Split('@'); txtEmailId.Text = splitEmailId[0] + "@"; txtEmailId.ExtendedMouseClick(); objChars.SetText(splitEmailId[1]); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); TxtFaxNumberAdd.ExtendedMouseClick(); objChars.SetNumeric(contactList[7]); Thread.Sleep(1000); BtnCancelAdd.ExtendedMouseClick(); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); System.Threading.Thread.Sleep(3000); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Enter); }
/// <summary> /// Updates the customer. /// </summary> /// <returns></returns> public void UpdateCustomer(string strID, string strName) { MouseKeyBoardSimulator objKeyPress = new MouseKeyBoardSimulator(); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); HtmlInputText ctrl_ID = GetHtmlControl<HtmlInputText>(guiMap, "CustomerID"); Thread.Sleep(2000); ctrl_ID.Focus(); ctrl_ID.Value = ""; ctrl_ID.ExtendedMouseClick(); objKeyPress.SetNumeric(strID); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); HtmlInputText ctrl_Name = GetHtmlControl<HtmlInputText>(guiMap, "CustomerName"); ctrl_Name.Value = ""; ctrl_Name.ExtendedMouseClick(); objKeyPress.SetText(strName); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); Thread.Sleep(1000); Telerik.ActiveBrowser.RefreshDomTree(); Thread.Sleep(5000); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Enter); }
/// <summary> /// Adds the customer. /// </summary> /// <returns></returns> public void AddCustomer(string strID, string strName) { MouseKeyBoardSimulator objKeyPress = new MouseKeyBoardSimulator(); //objKeyPress.KeyPress(System.Windows.Forms.Keys.Tab); HtmlInputText ctrl_ID = GetHtmlControl<HtmlInputText>("CustomerID"); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); ctrl_ID.Focus(); ctrl_ID.InvokeEvent(ScriptEventType.OnClick); objKeyPress.SetNumeric(strID); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); HtmlInputText ctrl_Name = GetHtmlControl<HtmlInputText>("CustomerName"); ctrl_Name.Focus(); ctrl_Name.ExtendedMouseClick(); objKeyPress.SetText(strName); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Tab); Thread.Sleep(1000); Telerik.ActiveBrowser.RefreshDomTree(); Thread.Sleep(5000); MouseKeyboardLibrary.KeyboardSimulator.KeyPress(System.Windows.Forms.Keys.Enter); }