Ejemplo n.º 1
0
 public static void editMisc(bool student, string biometric, string bloodgroup = "B+", string height = "170", string weight = "50", string placeofbirth = "Georgia", string language = "English", string nationality = "Dominican", string race = "Other Race", string religion = "Other")
 {
     if (student)
     {
         Navigate.RandomStudent();
         CustomControls.click("//*[@id=\"tab-profile\"]/div[2]/div/ul/li[3]/a", propertytype.XPath);
         Wait.ImplicitWait(10);
         CustomControls.click("//*[@id=\"tab-miscellenaous\"]/div/div[1]/button", propertytype.XPath);
         Wait.ImplicitWait(10);
         delayfor.delay();
         CustomControls.Entertext("#biometric_id", biometric, propertytype.CssSelector);
         Wait.ImplicitWait(10);
         CustomControls.click("//*[@id=\"blood_group\"]", propertytype.XPath);
         Wait.ImplicitWait(10);
         CustomControls.Selectdropdown("//*[@id=\"blood_group\"]", bloodgroup, propertytype.XPath);
         Wait.ImplicitWait(10);
         CustomControls.Entertext("//*[@id=\"height\"]", height, propertytype.XPath);
         Wait.ImplicitWait(10);
         CustomControls.Entertext("//*[@id=\"weight\"]", weight, propertytype.XPath);
         Wait.ImplicitWait(10);
         CustomControls.Entertext("//*[@id=\"place_of_birth\"]", placeofbirth, propertytype.XPath);
         Wait.ImplicitWait(10);
         CustomControls.click("//*[@id=\"language\"]", propertytype.XPath);
         CustomControls.Selectdropdown("//*[@id=\"language\"]", language, propertytype.XPath);
         CustomControls.click("//*[@id=\"nationality\"]", propertytype.XPath);
         CustomControls.Selectdropdown("//*[@id=\"nationality\"]", nationality, propertytype.XPath);
         CustomControls.click("//*[@id=\"race\"]", propertytype.XPath);
         CustomControls.Selectdropdown("//*[@id=\"race\"]", race, propertytype.XPath);
         Wait.ImplicitWait(10);
         CustomControls.click("//*[@id=\"religion\"]", propertytype.XPath);
         CustomControls.Selectdropdown("//*[@id=\"religion\"]", religion, propertytype.XPath);
         Wait.ImplicitWait(10);
         CustomControls.click("//*[@id=\"save-close-button\"]", propertytype.XPath);
         Wait.ImplicitWait(10);
         //ok
         CustomControls.click("//*[@id=\"appbody\"]/div[6]/div[7]/button[2]", propertytype.XPath);
     }
     else
     {
         Navigate.RandomEmployee();
         CustomControls.click("//*[@id=\"li-miscellenouss\"]", propertytype.XPath);
         CustomControls.click("//*[@id=\"tab-miscellenous\"]/div[1]/button", propertytype.XPath);
         Wait.ImplicitWait(10);
         delayfor.delay(); //REQUIRED. ASK ALTERNATIVE
         CustomControls.Entertext("/html/body/div[2]/div[2]/div[2]/div/div/div/div/div/div/form/div/div[1]/div/input", biometric, propertytype.XPath);
         Wait.ImplicitWait(10);
         CustomControls.click("//*[@id=\"employee_blood_group\"]", propertytype.XPath);
         Wait.ImplicitWait(10);
         CustomControls.Selectdropdown("//*[@id=\"employee_blood_group\"]", bloodgroup, propertytype.XPath);
         Wait.ImplicitWait(10);
         CustomControls.Entertext("//*[@id=\"employee_height\"]", height, propertytype.XPath);
         Wait.ImplicitWait(10);
         CustomControls.click("//*[@id=\"employee_religion\"]", propertytype.XPath);
         CustomControls.Selectdropdown("//*[@id=\"employee_religion\"]", religion, propertytype.XPath);
         Wait.ImplicitWait(10);
         CustomControls.click("//*[@id=\"save-close-button\"]", propertytype.XPath);
         delayfor.delay();
         //ok
         CustomControls.click("//*[@id=\"appbody\"]/div[6]/div[7]/button[2]", propertytype.XPath);
     }
 }