internal void FillSchedrule(int DataRow) { //Check if the user is able to click on a "Start Date" for the "Available days" field StartDateDropDown.Click(); StartDateDropDown.Clear(); StartDateDropDown.SendKeys(GlobalDefinitions.ReadData(DataRow, "StartDate")); //Check if the user is able to click on a "End Date" for the "Available days" field EndDateDropDown.Click(); EndDateDropDown.Clear(); EndDateDropDown.SendKeys(GlobalDefinitions.ReadData(DataRow, "EndDate")); //Check if the user is able to click on a "Day" checkbox for the "Available days" field for (var i = 1; i <= 5; i++) { Days[i].Click(); } //Check if the user is able to select a "Start Time" for the "Available days" field StartTimeDropDown.SendKeys(GlobalDefinitions.ReadData(DataRow, "StartTime")); //Check if the user is able to select a "End Time" for the "Available days" field EndTimeDropDown.SendKeys(GlobalDefinitions.ReadData(DataRow, "EndTime")); //Check if the user is able to click on "Credits" as the "Skill Trade" option SkillTradeCreditsOption.Click(); //Check if the user is able to enter a number for the "Credits" field CreditAmount.Clear(); CreditAmount.SendKeys(GlobalDefinitions.ReadData(DataRow, "Credit")); //Check if the user is able to set an option for the "Active" field ActiveOption.Click(); }
internal void register() { //Populate the excel data GlobalDefinitions.PopulateInCollection(Base.ExcelPath, "SignUp"); //Click on Join button Join.Click(); //Enter FirstName FirstName.SendKeys(GlobalDefinitions.ReadData(2, "FirstName")); //Enter LastName LastName.SendKeys(GlobalDefinitions.ReadData(2, "LastName")); //Enter Email Email.SendKeys(GlobalDefinitions.ReadData(2, "Email")); //Enter Password Password.SendKeys(GlobalDefinitions.ReadData(2, "Password")); //Enter Password again to confirm ConfirmPassword.SendKeys(GlobalDefinitions.ReadData(2, "ConfirmPswd")); //Click on Checkbox Checkbox.Click(); //Click on join button to Sign Up JoinBtn.Click(); }
internal void UploadSample(int DataRow) { //Click on Upload Sample File WorkSample.Click(); //Uses AutoIt to handle the file explorer AutoIt.UploadFile(GlobalDefinitions.ReadData(DataRow, "FilePath")); }
internal void EditOptions(int DataRow) { //Check if the user is able to Click on the "Skill Exchange" option SkillTradeExchangeOption.Click(); //Check if the user is able to create a tag for the "Skill Exchange" field SkillExchange.SendKeys(GlobalDefinitions.ReadData(DataRow, "SkillExchange") + Keys.Enter); }
internal void EnterText(int DataRow) { //Check if the user is able to Enter Text in the "Title" field Title.Clear(); Title.SendKeys(GlobalDefinitions.ReadData(DataRow, "Title")); //Check if the user is able to Enter Text in the "Description" field Description.Clear(); Description.SendKeys(GlobalDefinitions.ReadData(DataRow, "Description")); }
internal void LoginSteps() { //Prepares the Excel Sheet GlobalDefinitions.PopulateInCollection(Base.ExcelPath, "SignIn"); //Click on LogIn button SignIntab.Click(); //Fill LogIn details Email.SendKeys(GlobalDefinitions.ReadData(3, "Username")); Password.SendKeys(GlobalDefinitions.ReadData(3, "Password")); //Complete Log In LoginBtn.Click(); }
internal void FillDetails(int DataRow) { //Check if the user is able to Enter Text in the "Title" field EnterText(DataRow); //Check if the user is able to "Click" on the "Category" dropdown list CategoryDropDown.Click(); CategoryDropDown.SendKeys(Keys.ArrowDown + Keys.Enter); //Check if the user is able to "Click" on the "SubCategory" dropdown list SubCategoryDropDown.Click(); SubCategoryDropDown.SendKeys(Keys.ArrowDown + Keys.Enter); //Check if the user is able to "Enter" a "Tag" Tags.SendKeys(GlobalDefinitions.ReadData(DataRow, "Tag") + Keys.Enter); //Check if the user is able to "Click" on a "Service Type" option ServiceTypeOptions.Click(); //Check if the user is able to "Click" on a "Location Type" option LocationTypeOption.Click(); }
internal void CheckDetails(int DataRow) { //Prepares the Excel Sheet GlobalDefinitions.PopulateInCollection(Base.ExcelPath, "ShareSkill"); //Creates a result variable bool CheckResult = true; //Compares description with expected description if (Description.Text != GlobalDefinitions.ReadData(DataRow, "Description")) { CheckResult = false; } if (CheckResult == true) { Assert.Pass(); } else { Assert.Fail(); } }
internal void CheckListing(int DataRow) { //Creates a bool to determine the check result bool CheckResult = true; //Prepares the Excel Sheet GlobalDefinitions.PopulateInCollection(Base.ExcelPath, "ShareSkill"); //Compares the listing data if (SkillDescription.Text != GlobalDefinitions.ReadData(DataRow, "Description")) { CheckResult = false; } //Asserts the test base on the Check Result if (CheckResult == true) { Assert.Pass(); } else { Assert.Fail(); } }