internal void EnterShareSkill()
        {
            WaitHelpers.ElementIsVisible(driver, "XPath", "//h3[contains(text(),'Title')]", 5);
            //Type in Title and Description
            Title.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Title"));
            Description.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Description"));

            //Select Category and Subcategory dropdown list
            new SelectElement(CategoryDropDown).SelectByText(GlobalDefinitions.ExcelLib.ReadData(2, "Category"));
            new SelectElement(SubCategoryDropDown).SelectByText(GlobalDefinitions.ExcelLib.ReadData(2, "SubCategory"));

            // Type in Tag and click enter
            Tags.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Tags"));
            Tags.SendKeys(Keys.Enter);

            //Select Service Type
            ServiceType();

            //Select Location Type
            LocationType();

            //Select start date
            StartDateDropDown.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Startdate"));

            //Select end date
            EndDateDropDown.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Enddate"));

            //Select day
            daySunday.Click();

            //Type in Start time and End time
            startTime.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Starttime"));
            endTime.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Endtime"));

            //Select Skill trade option
            SkillTradeOption.Click();

            //Skill-Exchange tag
            skillExchangeTag.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Skill-Exchange"));
            skillExchangeTag.SendKeys(Keys.Enter);

            //Click on add file
            addFileIcon.Click();

            //Select file
            AutoItX3 autoIT = new AutoItX3();

            autoIT.WinWait("Open");
            autoIT.WinActivate("Open");
            autoIT.Send("C:\\Users\\User\\Documents\\SignInFeatureFile");
            autoIT.Send("{ENTER}");


            //Select Active
            activeOption.Click();

            //Click save button
            saveButton.Click();
        }
        internal void EditShareSkill()
        {
            //Type in Title
            Title.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Title"));

            //Click save button
            saveButton.Click();
            WaitHelpers.ElementIsVisible(driver, "XPath", "//h2[contains(text(),'Manage Listings')]", 5);
        }
Beispiel #3
0
        internal void ClickDeleteButton()
        {
            WaitHelpers.ElementIsVisible(driver, "XPath", "//tbody/tr[1]/td[8]/div[1]/button[3]/i[1]", 5);
            //Click delete icon
            deleteIcon.Click();

            //Click to confirm
            confirmDeleteButton.Click();
            WaitHelpers.ElementIsVisible(driver, "XPath", "//div[contains(text(),'Selenium Webdriver using CsharpEDITED has been deleted')]", 5);
        }
Beispiel #4
0
 internal void FindEditedSkillListing()
 {
     WaitHelpers.ElementIsVisible(driver, "XPath", "//table/tbody/tr[1]/td[3]", 5);
     if (findSkillListingElement.Text == "Selenium Webdriver using CsharpEDITED")
     {
         Assert.Pass("Listing record edited usccessfully, test passed!");
     }
     else
     {
         Assert.Fail("Listing not found, test failed!");
     }
 }
Beispiel #5
0
        internal void LoginSteps()
        {
            //Initiate Excel file
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "SignIn");

            //Click sign in button
            SignIntab.Click();

            //Type in username
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Username"));

            //Type in password
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Click login button
            LoginBtn.Click();

            WaitHelpers.ElementIsVisible(driver, "XPath", "//a[contains(text(),'Mars Logo')]", 5);
        }
Beispiel #6
0
 internal void ClickEditButton()
 {
     WaitHelpers.ElementIsVisible(driver, "XPath", "//tbody/tr[1]//div[1]/button[2]/i[1]", 5);
     //Click edit icon
     editIcon.Click();
 }
Beispiel #7
0
 internal void GoToManageListings()
 {
     manageListingsLink.Click();
     WaitHelpers.ElementIsVisible(driver, "Xpath", "//h2[contains(text(),'Manage Listings')]", 5);
 }