예제 #1
0
 private void WeatherBTN_Click(object sender, EventArgs e)
 {
     mapcontrol.Hide();
     Search.Show();
     SearchIcon.Show();
     maporweather = false;
 }
예제 #2
0
        public void SearchSkill()
        {
            Global.ExcelLib.PopulateInCollection(Base.ExcelPath, "SearchSkill");
            GlobalDefinitions.Wait();
            TxtSearcSkill.SendKeys(ExcelLib.ReadData(2, "Category"));
            SearchIcon.Click();
            //Checking the right page
            Assert.AreEqual("Search", GlobalDefinitions.driver.Title);
            Base.test = Base.extent.StartTest("On Share Search page");
            TxtSubCategory.SendKeys(ExcelLib.ReadData(2, "SubCategory"));
            SearchUser.SendKeys(ExcelLib.ReadData(2, "SearchUser"));
            IList <IWebElement> optionsToSelect = GlobalDefinitions.driver.FindElements(By.XPath("//input[@placeholder='Search user']"));

            foreach (IWebElement options in optionsToSelect)
            {
                Console.WriteLine(options);
                if (options.Text.Equals(SearchUser))
                {
                    Console.WriteLine("Trying to select: " + SearchUser);
                    options.Click();
                    break;
                }
            }
            Onsite.Click();
            Online.Click();
            ShowAll.Click();
        }
예제 #3
0
 public PeoplePage SearchTextandTeam(String text, int value)
 {
     TxtSearch.EnterText(text);
     CheckBox[value].Clicks();
     SearchIcon.Clicks();
     return(this);
 }
        internal void SearchSkillsByCategories(IWebDriver driver)
        {
            // Populate the excel data into system
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ShareSkillPath, "ShareSkill");

            // Wait and click on Search icon
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//i[@class='search link icon']", 10);
            SearchIcon.Click();

            // Wait, Click on Category and Sub-Category
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//*[@id='service-search-section']//section/div/div[1]/div[1]/div/a[last()]", 10);
            IWebElement Category = driver.FindElement(By.XPath("//a[contains(text(), '"
                                                               + GlobalDefinitions.ExcelLib.ReadData(2, "Category") + "')]"));

            Category.Click();

            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//a[@class='item subcategory']", 10);
            IWebElement SubCategory = driver.FindElement(By.XPath("//a[contains(text(), '"
                                                                  + GlobalDefinitions.ExcelLib.ReadData(2, "SubCategory") + "')]"));

            SubCategory.Click();

            // Test extent report
            Base.test.Log(LogStatus.Pass, "Search Skills by Category sucessfully!");
        }
예제 #5
0
 /// <summary>
 /// Searches using the search box at the top navigation menu.
 /// </summary>
 public void SearchByTopNavigationMenu()
 {
     Driver.Manage().Window.Maximize();
     PageHelper.WaitForElement(Driver, SearchIcon);
     SearchIcon.Click();
     SearchIcon.SendKeys("NickRegTest");
     SearchIcon.SendKeys(Keys.Enter);
 }
예제 #6
0
        internal void FilterSearchSkills()
        {
            Thread.Sleep(500);

            // Input  Search skills "QA"
            SearchSkillsField.SendKeys("QA");

            // Click the Search button
            SearchIcon.Click();
            Thread.Sleep(1000);

            // Click the Onsite option
            Onsite.Click();
            Thread.Sleep(500);

            // Verify if filter the the selected filter result
            IWebElement CategoryResult = GlobalDefinitions.driver.FindElement(By.XPath("//p[@class='row-padded'][contains(text(),'QA')]"));

            Assert.That(CategoryResult.Text, Is.EqualTo("QA"));
        }
예제 #7
0
        internal void ChatWithOtherUser(IWebDriver driver)
        {
            // Populate the excel data into system
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "SignIn");

            // Wait and click on Search icon
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//i[@class='search link icon']", 10);
            SearchIcon.Click();

            // Wait and Enter name in Search user part
            GlobalDefinitions.WaitForElement(driver, "XPath",
                                             "//input[@placeholder='Search user']", 10);
            SearchUserInput.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Name"));

            // Wait and Choosse the first one option
            Thread.Sleep(1500);
            DropdownFirstOpt.Click();

            // Wait and Choose the first one result
            GlobalDefinitions.WaitForElement(driver, "XPath",
                                             "//*[@id='service-search-section']//div[2]/div/div/div[1]/a/img", 10);
            ResultFirstOpt.Click();

            // Wait and click on Chat button
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//a[@href='/Home/Message/?user=5fc9c489b2bb710001b08fb7']", 10);
            ChatBtnOnProfile.Click();

            // Wait and input message in input area
            GlobalDefinitions.WaitForElement(driver, "Id", "chatTextBox", 10);
            ChatInputArea.SendKeys("Hi! Test!");
            Thread.Sleep(500);

            // Click on send button
            SendBtn.Click();

            // Extent report
            Base.test.Log(LogStatus.Pass, "Chat with other users successfully!");
        }
예제 #8
0
        public void ChatWithOtherUser(IWebDriver driver)
        {
            // Populate the excel data into system
            ExcelLib.PopulateInCollection(ConstantUtils.TestDataPath, "SignIn");

            // Wait and click on Search icon
            WaitForElementClickable(driver, "XPath",
                                    "//i[@class='search link icon']", 10);
            SearchIcon.Click();

            // Wait and Enter name in Search user part
            WaitForElement(driver, "XPath",
                           "//input[@placeholder='Search user']", 10);
            SearchUserInput.SendKeys(ExcelLib.ReadData(3, "Name"));

            // Wait and Choosse the first one option
            Thread.Sleep(1500);
            DropdownFirstOpt.Click();

            // Wait and Choose the first one result
            WaitForElement(driver, "XPath",
                           "//*[@id='service-search-section']//div[2]/div/div/div[1]/a/img", 10);
            ResultFirstOpt.Click();

            // Wait and click on Chat button
            WaitForElementClickable(driver, "XPath",
                                    "//a[@href='/Home/Message/?user=5fc9c489b2bb710001b08fb7']", 10);
            ChatBtnOnProfile.Click();

            // Wait and input message in input area
            WaitForElement(driver, "Id", "chatTextBox", 10);
            ChatInputArea.SendKeys("Hi! Test!");
            Thread.Sleep(500);

            // Click on send button
            SendBtn.Click();
        }
        internal void SearchSkillsByFilters(IWebDriver driver)
        {
            // Wait and click on Search icon
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//i[@class='search link icon']", 10);
            SearchIcon.Click();

            // Wait and check total results
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//*[@id='service-search-section']//div[2]/div/button[2]", 10);
            totalResults = int.Parse(driver.FindElement(By.XPath("//*[@id='service-search-section']//" +
                                                                 "div[1]/div[1]/div/a[1]/span")).Text);

            // Check online results
            FilterOnline.Click();
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//*[@id='service-search-section']//div[2]/div/button[2]", 10);
            onlineResults = int.Parse(driver.FindElement(By.XPath("//*[@id='service-search-section']//" +
                                                                  "div[1]/div[1]/div/a[1]/span")).Text);

            // Check onsite results
            FilterOnsite.Click();
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//*[@id='service-search-section']//div[2]/div/button[2]", 10);
            onsiteResults = int.Parse(driver.FindElement(By.XPath("//*[@id='service-search-section']//" +
                                                                  "div[1]/div[1]/div/a[1]/span")).Text);

            // Check show all results
            FilterShowAll.Click();
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//*[@id='service-search-section']//div[2]/div/button[2]", 10);
            showAllResults = int.Parse(driver.FindElement(By.XPath("//*[@id='service-search-section']//" +
                                                                   "div[1]/div[1]/div/a[1]/span")).Text);

            // Extent report
            Base.test.Log(LogStatus.Pass, "Search skills by filter successfully!");
        }
        // Send Request
        internal void SendRequest(IWebDriver driver)
        {
            // Populate the excel data into system
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "SignIn");

            // Wait and click on Search icon
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//i[@class='search link icon']", 10);
            SearchIcon.Click();

            // Wait and Enter name in Search user part
            GlobalDefinitions.WaitForElement(driver, "XPath",
                                             "//input[@placeholder='Search user']", 10);
            SearchUserInput.SendKeys(GlobalDefinitions.ExcelLib.ReadData(3, "Name"));

            // Wait and Choosse the first one option
            Thread.Sleep(1000);
            DropdownFirstOpt.Click();

            // Wait and Choose the first one result
            GlobalDefinitions.WaitForElement(driver, "XPath",
                                             "//*[@id='service-search-section']//div[2]/div/div/div[1]/a/img", 10);
            ResultFirstOpt.Click();

            // Wait, Record Skill Name and Click on Request
            GlobalDefinitions.WaitForElementClickable(driver, "XPath",
                                                      "//div[@class='ui teal  button']", 10);
            skillTitle = driver.FindElement(By.ClassName("skill-title")).Text;

            RequestButton.Click();

            // Wait and click on YES
            GlobalDefinitions.WaitForElement(driver, "XPath",
                                             "//button[@role='button']", 10);
            ConfirmButtonYes.Click();
        }
예제 #11
0
        internal void CategorySearchSkills()
        {
            // Wait 0.5 second
            Thread.Sleep(500);

            // Input Search skills "Testing"
            SearchSkillsField.SendKeys("Testing");

            // Click the Search button
            SearchIcon.Click();
            Thread.Sleep(1000);

            // Click the Category with results
            Category.Click();

            // Click the Subcategory with results
            Subcategory.Click();
            Thread.Sleep(500);

            // Verify if seller is able to see the selected category result
            IWebElement CategoryResult = GlobalDefinitions.driver.FindElement(By.XPath("//p[@class='row-padded'][contains(text(),'Testing')]"));

            Assert.That(CategoryResult.Text, Is.EqualTo("Testing"));
        }
예제 #12
0
 //Search Skills by All Categories
 public void SearchByAllCategories()
 {
     //Click on Search icon to get all the available Skills
     driver.WaitForElementIsVisible(SearchIcon);
     SearchIcon.Click();
 }
예제 #13
0
 public void ClickonSearch()
 {
     SearchIcon.Click();
     GlobalDefinitions.wait(10);
 }
예제 #14
0
 public void SearchSkillByCatg()
 {
     GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "SearchSkill");
     SearchTextBox.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Category Name"));
     SearchIcon.Click();
 }
예제 #15
0
 public PeoplePage SearchText(String searchText)
 {
     TxtSearch.EnterText(searchText);
     SearchIcon.Clicks();
     return(this);
 }