public void Double() { Enrolment_Page page = new Enrolment_Page(); Actions actions = new Actions(Web_Driver.driver); //WebElement elementLocator = driver.findElement(By.id("ID")); if (Double_click[0] == true) { actions.DoubleClick(page.Hash_Drop.ElementAt(0)).Perform(); Double_click[0] = false; } if (Double_click[1] == true) { actions.DoubleClick(page.Hash_Drop.ElementAt(1)).Perform(); Double_click[1] = false; } if (Double_click[2] == true) { actions.DoubleClick(page.Hash_Drop.ElementAt(2)).Perform(); Double_click[2] = false; } if (Double_click[3] == true) { actions.DoubleClick(page.Hash_Drop.ElementAt(2)).Perform(); Double_click[3] = false; } if (Double_click[4] == true) { actions.DoubleClick(page.Hash_Drop.ElementAt(2)).Perform(); Double_click[4] = false; } }
public static void Enrolment_Search_Calls() { Enrolment_Page Page = new Enrolment_Page(); // Page.Dash_Board(); Page.Search_Enrolment(); }
public static void Enrol_Delete_Calls() { Delete_Enrolment_On = true; Enrolment_Page Page = new Enrolment_Page(); Page.Delete_Enrolment(); }
public static void Enrol_Calls() { Enrolment_Page Page = new Enrolment_Page(); Login_Call.Login_page_valid(); Page.Create_Enrolment(); }
public static void Enrolment_Edit_Calls() { Enrolment_Page Page = new Enrolment_Page(); // Page.Dash_Board(); Login_Call.Login_page_valid(); Page.Edit_Enrolment(); }
public EA_POM Appointment_Delete() { Enrolment_Page page = new Enrolment_Page(); //Actually delting Appoinment here //Clicking on Appoinment Tab# Web_Driver.ngWebDriver.WaitForAngular(); Web_Driver.driver.Navigate().Refresh(); Apponitment_Tab.ElementAt(0).Click(); page.Delete_Enrolment(); return(new EA_POM()); }
public EA_POM Appointment_Search() { Thread.Sleep(4000); Apponitment_Tab.ElementAt(0).Click(); Enrolment_Page page = new Enrolment_Page(); Thread.Sleep(2000); //Clicking on DropDown page.Hash_Drop.ElementAt(0).Click(); Thread.Sleep(3000); //Clicking inside the Search box page.Search_Records.ElementAt(0).Click(); //Passing data into Search box page.Search_Records.ElementAt(0).SendKeys("1741"); try { //Clicking on Search btn page.Search_btn.ElementAt(0).Click(); //getting button Element Search_btn_bool = page.Search_btn.ElementAt(0).Displayed; Thread.Sleep(3000); //Search button verify if (Search_btn_bool == true) { Asserts.Assert_Search_btn(true); } } catch { Asserts.Assert_Search_btn(false); } //Verifying Search results for (int i = 0; i < page.Search_Record_Results.Count; i++) { Thread.Sleep(3000); Text_Heightlight.highlight(); Id_Bool = page.Search_Record_Results[i].Displayed; Console.WriteLine(page.Search_Record_Results[i].Text); } if (Id_Bool == true) { Asserts.Assert_Id_Found(true); } else { Asserts.Assert_Id_Found(false); } Thread.Sleep(3000); Double_click[0] = true; // Web_Driver.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(3); Double(); //Clicking on Clear Button Thread.Sleep(3000); try { //Verifying Search_Clear button page.Clear_Btn.ElementAt(0).Click(); Clear_Bool = page.Clear_Btn.ElementAt(0).Displayed; if (Clear_Bool == true) { Asserts.Assert_Search_Clear(true); } } catch { Asserts.Assert_Search_Clear(false); } //Disapear Drop Thread.Sleep(3000); page.Hash_Drop.ElementAt(0).Click(); //Verifying Search With Name //Clicking on DropDown page.Hash_Drop.ElementAt(1).Click(); Thread.Sleep(3000); //Clicking inside the Search box page.Search_Records.ElementAt(1).Click(); //Passing data into Search box page.Search_Records.ElementAt(1).SendKeys("Usama"); try { //Clicking on Search btn page.Search_btn.ElementAt(1).Click(); //getting button Element Search_btn1_bool = page.Search_btn.ElementAt(1).Displayed; Thread.Sleep(3000); //Search button verify if (Search_btn1_bool == true) { Asserts.Assert_Search_btn(true); } } catch { Asserts.Assert_Search_btn(false); } //Verifying Search results try { int i; bool[] Name_Bool = new bool[page.Search_Record_Results.Count]; Console.WriteLine(page.Search_Record_Results.Count + "" + " Records"); for (i = 0; i < page.Search_Record_Results.Count; i++) { Text_Heightlight.highlight1(); Name_Bool[i] = page.Search_Record_Results[i].Displayed; Console.WriteLine(page.Search_Record_Results[i].Text); if (Name_Bool[i] == true) { Asserts.Assert_Name_Found(Name_Bool[i]); } } if (page.Search_Record_Results.Count == 0) { Asserts.Assert_Name_Found(false); } } catch { } Thread.Sleep(3000); Double_click[1] = true; // Web_Driver.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(3); Double(); //Clicking on Clear Button Thread.Sleep(3000); try { //Verifying Search_Clear button page.Clear_Btn.ElementAt(1).Click(); Clear_Bool_1 = page.Clear_Btn.ElementAt(1).Displayed; if (Clear_Bool_1 == true) { Asserts.Assert_Search_Clear(true); } } catch { Asserts.Assert_Search_Clear(false); } //Disapear Drop Thread.Sleep(3000); page.Hash_Drop.ElementAt(1).Click(); //Verifying email Address //Verifying Created //Getting Latest date Created_Latest_Date = Created_Date.Text; Text_Heightlight.highlight2(); Console.WriteLine(Created_Latest_Date); page.Created_Click.Click(); Thread.Sleep(3000); Created_Last_Date = Created_Date.Text; Console.WriteLine(Created_Last_Date); Asserts.Date_Comparison(Created_Latest_Date, Created_Last_Date); //Verifying Status page.Hash_Drop.ElementAt(2).Click(); Thread.Sleep(3000); //Clicking inside the Search box page.Search_Records.ElementAt(2).Click(); //Passing data into Search box page.Search_Records.ElementAt(2).SendKeys("Draft"); try { //Clicking on Search btn page.Search_btn.ElementAt(3).Click(); //getting button Element Search_btn2_bool = page.Search_btn.ElementAt(3).Displayed; Thread.Sleep(3000); //Search button verify if (Search_btn2_bool == true) { Asserts.Assert_Search_btn(true); } } catch { Asserts.Assert_Search_btn(false); } //Verifying Search results Thread.Sleep(3000); Text_Heightlight.highlight3(); try { int i; bool[] Status_Bool = new bool[page.Search_Record_Results.Count]; for (i = 67; i < page.Search_Record_Results.Count; i++) { Status_Bool[i] = page.Search_Record_Results[i].Displayed; Console.WriteLine(page.Search_Record_Results[i].Text); if (Status_Bool[i] == true) { Asserts.Assert_Status_Found(Status_Bool[i]); } } if (page.Search_Record_Results.Count == 0) { Asserts.Assert_Status_Found(false); } } catch { } Thread.Sleep(3000); Double_click[3] = true; // Web_Driver.driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(3); Double(); //Clicking on Clear Button Thread.Sleep(3000); try { //Verifying Search_Clear button page.Clear_Btn.ElementAt(3).Click(); Clear_Bool_2 = page.Clear_Btn.ElementAt(3).Displayed; if (Clear_Bool_2 == true) { Asserts.Assert_Search_Clear(true); } } catch { Asserts.Assert_Search_Clear(false); } //Disapear Drop Thread.Sleep(3000); page.Hash_Drop.ElementAt(2).Click(); return(new EA_POM()); }
public static void Dash_Board() { Enrolment_Page page = new Enrolment_Page(); page.Dash_Board(); }