Exemplo n.º 1
0
 /// <summary>
 /// Seaching from page
 /// </summary>
 /// <param name="Anything"> what you searching for</param>
 public void Search(string Anything)
 {
     SearchTxt.Clear();
     SearchTxt.SendKeys(Anything);
     Browser.WaitForElement(Bys.AMAPage.LoadIcon, ElementCriteria.IsNotVisible);
     SearchBtn.Click();
     Browser.WaitForElement(Bys.AMAPage.LoadIcon, ElementCriteria.IsNotVisible);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Enters text into the top left hand Search field, clicks Go, then waits for the Search Results page to load
        /// </summary>
        /// <param name="textToEnter">The text you want to enter into the Search field</param>
        /// <returns></returns>
        public SearchResultsPage Search(string textToEnter)
        {
            SearchTxt.Clear();
            SearchTxt.SendKeys(textToEnter);
            SearchBtn.Click();

            SearchResultsPage page = new SearchResultsPage(Browser);

            page.WaitForInitialize();
            return(page);
        }
Exemplo n.º 3
0
        private void SearchBtn_Click(object sender, EventArgs e)           //Skriver ut informationen om personen man man sökt på i Edit sidan.
        {
            Search.SearchEditUser(SearchTxt.Text);

            EmailLbl.Text       = emailLbl;             //Här nedan så skrivs all information in i alla tomma variaberna på skärmen.
            FirstNameLbl.Text   = firstNameLbl;
            LastNameLbl.Text    = lastNameLbl;
            AddressLbl.Text     = addressLbl;
            PhonenumberLbl.Text = phoneNumberLbl;
            JobTitleLbl.Text    = jobTitleLbl;
            SalaryLbl.Text      = salaryLbl;
            SearchTxt.Clear();                                            //Rensar fältet.
        }
Exemplo n.º 4
0
        /// <summary>
        /// Selecting a value from the Status dropdown, Entering text in the name text box and clicking search
        /// </summary>
        /// <param name="UserStatus">Select user status from dropdown</param>
        /// <param name="UserName">passing username</param>
        public void SearchForUserByStatusAndName(String UserStatus, String UserName)
        {
            Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(180), ElementCriteria.IsNotVisible);
            StatusSelElem.SelectByValue(UserStatus);
            SearchTxt.Clear();
            SearchTxt.SendKeys(UserName);
            Browser.WaitForElement(Bys.AMAPage.SearchBtn, TimeSpan.FromSeconds(180), ElementCriteria.IsEnabled, ElementCriteria.IsVisible);
            try
            {
                Thread.Sleep(0500);
                SearchBtn.Click();
            }
            catch (InvalidOperationException)
            {
                SearchTxt.SendKeys(Keys.Enter);
                SearchTxt.SendKeys(Keys.Enter);
            }

            // StatusSelElem.SelectByValue(UserStatus);
            Browser.WaitForElement(Bys.AMAPage.LoadIcon, ElementCriteria.IsNotVisible);
        }
Exemplo n.º 5
0
 private void SearchTxt_MouseDown(object sender, MouseEventArgs e)
 {
     SearchTxt.Clear();
 }