public void handleAddLocalQuestionFileUpload(String refrence, String label, String RequiredOption, String ReadOnlyOption) { try { EperformAddquestionButton.Click(); EperformFileUploadRadioBtn.Click(); //EperformFileUploadTextBox.SendKeys("C:\\Users\\vijay.pandit\\Documents\\Visual Studio 2015\\Projects\\EPerform\\AutoIt\\Sample.txt"); eleBtnSubmit.Click(); Assert.IsTrue(EperformComponentTypeText.Displayed, "Component Type is not displayed"); ExtentReport.test.Log(LogStatus.Pass, EperformComponentTypeText.Text + "is displayed"); EperformReferenceTestbox.SendKeys(refrence); System.Threading.Thread.Sleep(2000); LabelhandleFrame.Click(); TxtLabel(label); if (ReadOnlyOption == "Yes") { EperformReadOnlyYesRadioBtn.Click(); } if (RequiredOption == "Yes") { EperformRequiredYesRadioBtn.Click(); } eleBtnSubmit.Click(); BaseMethods.verifyWebElement(EperformSuccessMessage, "Eperform Success Message is not displayed in manage form", "Eperform Success Message is displayed in manage form"); } catch (Exception e) { ExtentReport.test.Log(LogStatus.Fatal, "Exception Message: " + e.Message); } }
//Eperform To handleNumeric Method public void handleYesNo(String refrence, String label, String RequiredOption, String ReadOnlyOption) { try { EperformAddquestionButton.Click(); EperformYesNoRadioBtn.Click(); eleBtnSubmit.Click(); Assert.IsTrue(EperformComponentTypeText.Displayed, "Component Type is not displayed"); ExtentReport.test.Log(LogStatus.Pass, EperformComponentTypeText.Text + "is displayed"); EperformReferenceTestbox.SendKeys(refrence); System.Threading.Thread.Sleep(2000); LabelhandleFrame.Click(); TxtLabel(label); if (ReadOnlyOption == "Yes") { EperformReadOnlyYesRadioBtn.Click(); } if (RequiredOption == "Yes") { EperformRequiredYesRadioBtn.Click(); } eleBtnSubmit.Click(); BaseMethods.verifyWebElement(EperformSuccessMessage, "Eperform Success Message is not displayed in manage form", "Eperform Success Message is displayed in manage form"); } catch (Exception e) { ExtentReport.test.Log(LogStatus.Fatal, "Exception Message: " + e.Message); } }
//Eperform To handleLocalQuestionSelectSingleItemfromaList Method public void handleLocalQuestionSelectSingleItemfromaList(String refrence, String Answerformat, String label, String RequiredOption, String ReadOnlyOption) { try { EperformAddquestionButton.Click(); RdoSelectSingleItem.Click(); eleBtnSubmit.Click(); Assert.IsTrue(EperformComponentTypeText.Displayed, "Component Type is not displayed"); ExtentReport.test.Log(LogStatus.Pass, EperformComponentTypeText.Text + "is displayed"); Assert.IsTrue(EperformOptionsIcon.Displayed, "Eperform Options Icon is not displayed"); ExtentReport.test.Log(LogStatus.Pass, "Eperform Options Icon is displayed"); EperformReferenceTestbox.SendKeys(refrence); System.Threading.Thread.Sleep(2000); LabelhandleFrame.Click(); TxtLabel(label); if (ReadOnlyOption == "Yes") { EperformReadOnlyYesRadioBtn.Click(); } if (RequiredOption == "Yes") { EperformRequiredYesRadioBtn.Click(); } EperformAnswerformatDropDownIcon.Click(); foreach (IWebElement element in EperformAnswerformatDropDownText) { Assert.IsTrue(element.Displayed, element.Text + " is not dispalyed"); ExtentReport.test.Log(LogStatus.Pass, element.Text + "is displayed in manage form"); } BaseMethods.DdlSelectByValue(EperformAnswerformatDropDownIcon, Answerformat); System.Threading.Thread.Sleep(2000); eleBtnSubmit.Click(); eleBtnSubmit.Click(); BaseMethods.verifyWebElement(EperformSuccessMessage, "Eperform Success Message is not displayed in manage form", "Eperform Success Message is displayed in manage form"); EperformCancelButton.Click(); System.Threading.Thread.Sleep(2000); }catch (Exception e) { ExtentReport.test.Log(LogStatus.Fatal, "Exception Message: " + e.Message); } }
//Eperform To handleLocalQuestionSingleLineTextBox Method public void handleLocalQuestionSingleLineTextBox(String SingleQuestion, String refrence, String label, String Requiredption, String ReadOnlyOption) { try { SelectQuestionTypePage selectquestion = new SelectQuestionTypePage(_driver); Assert.IsTrue(RdoSingleItemSelect.Displayed, "Radio Single Line TextBox is not displayed Select Question Type"); ExtentReport.test.Log(LogStatus.Pass, "Radio Single Line TextBox is displayed Select Question Type"); RdoSingleItemSelect.Click(); EperformTxtSingleLineTextBox.SendKeys(SingleQuestion); eleBtnSubmit.Click(); Assert.IsTrue(EperformComponentTypeText.Displayed, "Component Type is not displayed"); ExtentReport.test.Log(LogStatus.Pass, EperformComponentTypeText.Text + "is displayed"); Assert.IsTrue(EperformReferenceTestbox.Displayed, "Eperform Reference Testbox is not displayed Select Question Type"); ExtentReport.test.Log(LogStatus.Pass, "Eperform Reference Testbox is displayed Select Question Type"); EperformReferenceTestbox.SendKeys(refrence); System.Threading.Thread.Sleep(2000); LabelhandleFrame.Click(); TxtLabel(label); if (ReadOnlyOption == "Yes") { EperformReadOnlyYesRadioBtn.Click(); } if (Requiredption == "Yes") { EperformRequiredYesRadioBtn.Click(); } EperformSubmitButton.Click(); System.Threading.Thread.Sleep(2000); EperformCancelButton.Click(); System.Threading.Thread.Sleep(2000); Assert.IsTrue(EperformGlobalQuestionDeleteButton.Displayed, "Eperform GlobalQuestion Delete Button is not displayed in manage form"); ExtentReport.test.Log(LogStatus.Pass, "Eperform GlobalQuestion Delete Button is displayed in manage form"); } catch (Exception e) { ExtentReport.test.Log(LogStatus.Fatal, "Exception Message: " + e.Message); } }
//Eperform To handleAddLocalQuestionMultiLineTextArea Method public void handleAddLocalQuestionMultiLineTextArea(String multilineValue, String refrence, String maxlength, String label, String Requiredption, String ReadOnlyOption) { try { SelectQuestionTypePage selectquestion = new SelectQuestionTypePage(_driver); EperformAddquestionButton.Click(); EperformRdoMultiLineTextArea.Click(); EperformTxtMultiLineTextArea.SendKeys(multilineValue); System.Threading.Thread.Sleep(2000); eleBtnSubmit.Click(); System.Threading.Thread.Sleep(2000); BaseMethods.webelementverify(EperformComponentTypeText); EperformReferenceTestbox.SendKeys(refrence); System.Threading.Thread.Sleep(2000); LabelhandleFrame.Click(); TxtLabel(label); if (ReadOnlyOption == "Yes") { EperformReadOnlyYesRadioBtn.Click(); } if (Requiredption == "Yes") { EperformRequiredYesRadioBtn.Click(); } EperformMaximumLengthTextBox.SendKeys(maxlength); EperformSubmitButton.Click(); BaseMethods.verifyWebElement(EperformSuccessMessage, "Eperform Success Message is not displayed in manage form", "Eperform Success Message is displayed in manage form"); BaseMethods.verifyWebElement(EperformGlobalQuestionDeleteButton, "Eperform GlobalQuestion Delete Button is not displayed in manage form", "Eperform GlobalQuestion Delete Button is displayed in manage form"); } catch (Exception e) { ExtentReport.test.Log(LogStatus.Fatal, "Exception Message: " + e.Message); } }