public void ValidateDelSkill() { //Identifying theSkill tab section and the click ConstantHelpers.Click_Operation(skillsBtn); for (int i = 1; i <= 3; i++) { //Get the Text Of The "Skill" var SkillTxt = GlobalDefinitions.driver.FindElement(By.XPath("/html/body/div[1]/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[" + i + "]/tr/td[1]")).Text; //Get the Text of the "Level" of skill var LvlTxt = GlobalDefinitions.driver.FindElement(By.XPath("/html/body/div[1]/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[" + i + "]/tr/td[2]")).Text; try { if (SkillTxt != "Scientist" && LvlTxt != "Intermediate") { Console.WriteLine("Deleted Skill has been Validated"); break; } } catch (Exception e) { Console.WriteLine(e.Message); } } }
public void Password_Change() { //wait GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("//span[contains(@tabindex,'0')]"), 2000); //Click on "Hi Papri" button ConstantHelpers.Click_Operation(Hi_Name); //Wait for Element GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("//a[@class='item'][contains(.,'Change Password')]"), 2000); //Click and SELECT "CHANGE PASSWORD" option ConstantHelpers.Click_Operation(Change_Pswrd); //Click "CURRENT PASSWORD" Field ConstantHelpers.Click_Operation(Crnt_Pswrd); //Sending Values to "CURRENT PASSWORD" Field ConstantHelpers.EnterText(Crnt_Pswrd, "123456"); //Sending Values to "NEW PASSWORD" Field ConstantHelpers.EnterText(Nw_Pswrd, "234567"); //Sending Values to "CONFIRM PASSWORD" Field ConstantHelpers.EnterText(Cnfrm_Pswrd, "234567"); //Wait for Element GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("//button[@type='button'][contains(.,'Save')]"), 2000); //Click "CHANGE PASSWORD SAVE" Click ConstantHelpers.Click_Operation(Chng_Pswrd_Sv); }
public void DeleteSkill() { //Identifying the SECOND DATA TAB SKILLS section and the click GlobalDefinitions.wait(30); ConstantHelpers.Click_Operation(skillsBtn); try { for (int i = 1; i <= 4; i++) { //Get The Text of The Skill var SkillTxt = GlobalDefinitions.driver.FindElement(By.XPath("/html/body/div[1]/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[" + i + "]/tr/td[1]")).Text; if (SkillTxt == "Scientist") { //Identify The CROSS sign to delete IWebElement CrsSign = GlobalDefinitions.driver.FindElement(By.XPath("/html/body/div[1]/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[ " + i + "]/tr/td[3]/span[2]/i")); //Click Crss Sgn CrsSign.Click(); break; } } } catch (Exception e) { Console.WriteLine(e.Message); } }
public void Search_By_Filter() { //Click On The "SEARCH ICON" ConstantHelpers.Click_Operation(Search_Icon); //Wait For "element" //GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("/html/body/div/div/div/div[2]/div/section/div/div[1]/div[3]/div[1]/div/div[2]/div/div/span"), 3000); //Click Search User ConstantHelpers.Click_Operation(Search_User_TxtBx); //Entering the user in "ENTER NAME" Text Box Search_User_TxtBx.SendKeys("papri dutta"); //Click on "ENTER NAME " Text Enter_Name_Txt.Click(); //Click the "Search user" button ConstantHelpers.Click_Operation(Search_Skills_TxtBx); //Enter "Skills" in "Search Skill" Text Box ConstantHelpers.EnterText(Search_Skills_TxtBx, "QA"); //Click on SERCH Sign In SERACH SKILLS Search_Sign.Click(); Thread.Sleep(6000); //Click On Online button Online.Click(); //Click "ONSITE" button // Click_Operation(onsite); }
public void UpdateNewSkill() { //Identifying the SECOND DATA TAB SKILLS section and the click ConstantHelpers.Click_Operation(skillsBtn); try { //Identifying pen like update sign icon from "Skills" Table and then click for (int i = 1; i <= 4; i++) { //Get the Text Of The "Language" // string SkillsTxt = Driver.driver.FindElement(By.XPath("//*[@data-tab ='second']/div/div/div/table/tbody[" + i + "]]/tr/td[1]")).Text; string SkillsTxt = Driver.driver.FindElement(By.XPath("/html/body/div[1]/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[" + i + "]/tr/td[1]")).Text; //Get the Text of the "Level" of language string SkillLvlTxt = Driver.driver.FindElement(By.XPath("/html/body/div[1]/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[" + i + "]/tr/td[2]")).Text; if (SkillsTxt == "Business Analyst" && SkillLvlTxt == "Expert") { IWebElement SkillsUpdatePen = Driver.driver.FindElement(By.XPath("/html/body/div[1]/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[" + i + "]/tr/td[3]/span[1]/i")); //Click on Update Pen Icon ConstantHelpers.Click_Operation(SkillsUpdatePen); //Get The Skills Text Text Box IWebElement SkillsTxtBx = Driver.driver.FindElement(By.XPath("//input[contains(@placeholder,'Add Skill')]")); //Click Language Text Box ConstantHelpers.Click_Operation(SkillsTxtBx); //Clear the Text Box SkillsTxtBx.Clear(); //Send data To "Language Text Box" SkillsTxtBx.SendKeys("Scientist"); //Get The level DropDown Box and Click IWebElement SkillLvlDrpdwn = Driver.driver.FindElement(By.XPath("/html/body/div[1]/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[" + i + "]/tr/td/div/div[2]/select")); SkillLvlDrpdwn.Click(); //Select level value from Dropdown Box ConstantHelpers.Drop_Down_Select_By_Text(SkillLvlDrpdwn, "Intermediate"); //Identifying Update Button IWebElement UpdateBtn = Driver.driver.FindElement(By.XPath("/html/body/div[1]/div/section[2]/div/div/div/div[3]/form/div[3]/div/div[2]/div/table/tbody[" + i + "]/tr/td/div/span/input[1]")); //Click Update UpdateBtn.Click(); break; } } } catch (Exception e) { Console.WriteLine(e.Message); } }
public void SkillSearch_By_SubCateogory() { //Click On The "SEARCH ICON" GlobalDefinitions.wait(30); ConstantHelpers.Click_Operation(Search_Icon); try { ////Traversing Through The Subcategories //for (int i = 1; i <= 6; i++) //{ //Finding the element " Category" IWebElement Ctgry_Lbl = GlobalDefinitions.driver.FindElement(By.XPath("/html/body/div/div/div/div[2]/div/section/div/div[1]/div[1]/div/a[7]")); //Click the " Category" label Ctgry_Lbl.Click(); //Get the Text of the " Category" string Ctgry_Txt = Ctgry_Lbl.Text; //Wait For element if (Ctgry_Txt == "Programming & Tech") { for (int i = 8; i <= 13; i++) { //Finding The "Sub Category" IWebElement SubCategry_Lvl = GlobalDefinitions.driver.FindElement(By.XPath("/html/body/div/div/div/div[2]/div/section/div/div[1]/div[1]/div/a[" + i + "]")); //Get the Sub Category Text string SubCategry_Lvl_Txt = SubCategry_Lvl.Text; if (SubCategry_Lvl_Txt == "QA") { SubCategry_Lvl.Click(); GlobalDefinitions.wait(6000); break; } } } //Wait for element to be visible whose Photo(Name Jignesh Patel) is Showing GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("/html/body/div/div/div/div[2]/div/section/div/div[2]/div/div[2]/div/div/div[3]/div[1]/a[1]"), 6000); } catch (Exception) { Console.WriteLine("Test Case Failed"); } ////Wait For element //GlobalDefinitions.WaitForElement(GlobalDefinitions.driver, By.XPath("(//a[contains(@class,'item subcategory')])[4]"), 1000); ////Drop down selection //Select_Drop_Down(Prgrmng_Tch, "QA"); }
public void SkillSearch_By_AllCategories() { // //Click the "SEARCH" Skill tab // Click_Operation(search); //Click On The "SEARCH ICON" GlobalDefinitions.wait(30); ConstantHelpers.Click_Operation(Search_Icon); //Click on "All Categories" tab GlobalDefinitions.wait(30); ConstantHelpers.Click_Operation(All_Category); GlobalDefinitions.wait(30); }
public void PasswordButton() { //wait Driver.WaitForElement(Driver.driver, By.XPath("//span[contains(@tabindex,'0')]"), 2000); //Click on "Hi Papri" button ConstantHelpers.Click_Operation(Hi_Name); //Wait for Element Driver.WaitForElement(Driver.driver, By.XPath("//a[@class='item'][contains(.,'Change Password')]"), 2000); //Click and SELECT "CHANGE PASSWORD" option ConstantHelpers.Click_Operation(Change_Pswrd); }