public static void ITC_EditSubject(int SubjectID, IWebDriver driver) { string StudyName = GenericFunctions.goAndGet("STUDYID"); string SiteName = GenericFunctions.goAndGet("SITEID"); GenericFunctions.ClickOnButton("editBtn", driver); GenericFunctions.Wait(5); Functions.Reporting.ReportScreenshot("Edit_", driver); GenericFunctions.Clear("SubjectEMail", driver); GenericFunctions.Type(SubjectID + "@email-modified.com", "SubjectEMail", driver); //ClickElement(driver.FindElement(By.XPath("//*[@id=\"patientEditSaveButton\"]/span"))); GenericFunctions.ClickElement(driver.FindElement(By.XPath("//*[@id=\"patientEditSaveButton\"]")), driver); GenericFunctions.Wait(20); var InputtedSecretQuestion = "In what city or town does your nearest sibling live?"; var getSecretQuestion = driver.FindElement(By.Id("Patient_SecurityQuestion")).GetAttribute("value"); //var getSecretQuestion = driver.FindElement(By.Id("SecurityQuestionDropDownList")).GetAttribute("value"); var InputtedSecretQuestionAnswer = "Nottingham"; var getSecretQuestionAnswer = driver.FindElement(By.Id("Patient_SecurityQuestionAnswer")).GetAttribute("value"); if (getSecretQuestion.Equals(InputtedSecretQuestion) && (getSecretQuestionAnswer.Equals(InputtedSecretQuestionAnswer))) { GenericFunctions.ReportTheTestPassed("The secret question (" + getSecretQuestion + ") and secret answer (" + getSecretQuestionAnswer + ") are correct "); _startUp.TestPasses++; _startUp.Passes++; } else { GenericFunctions.ReportTheTestFailed("The secret question is incorrect. The expected question is: " + InputtedSecretQuestion + "The actual question is: " + getSecretQuestion); GenericFunctions.ReportTheTestFailed("The secret question answer is incorrect. The expected question answer is: " + InputtedSecretQuestionAnswer + "The actual question is: " + getSecretQuestionAnswer); _startUp.TestFails++; _startUp.Fails++; } GenericFunctions.Wait(2); GenericFunctions.ClickOnLink("Subject Administration", driver); GenericFunctions.Wait(5); Functions.Reporting.ReportScreenshot("Edit", driver); }