Beispiel #1
0
 public void ClickOnElementByCssSelector(string cssSelector)
 {
     // if (!driver.FindElementByCssSelector(cssSelector).Selected)
     SiteDriver.FindElement(cssSelector, How.CssSelector)
     .Click();
     Console.WriteLine("Clicked on element");
 }
Beispiel #2
0
 public void ClickOnFavItem(int col, int row, int rowCol)
 {
     // if (!driver.FindElementByCssSelector(cssSelector).Selected)
     SiteDriver.FindElement(String.Format(_demoPage.CheckboxCssSelector, col, row, rowCol), How.CssSelector)
     .Click();
     Console.WriteLine("Clicked on element of Side {0} for row:{1} fav item, selected {2} item", col, row, rowCol);
 }
Beispiel #3
0
 public void SetValueByCssSelector(string cssSelector, string value)
 {
     SiteDriver.FindElement(cssSelector, How.CssSelector)
     .Clear();
     SiteDriver.FindElement(cssSelector, How.CssSelector)
     .SendKeys(value);
     Console.WriteLine("Set element value as " + value);
 }
Beispiel #4
0
        public void SetTextArea(string cssSelector, int length)
        {
            var longtext = new string('a', length);

            SiteDriver.FindElement(cssSelector, How.CssSelector)
            .Clear();
            SiteDriver.FindElement(cssSelector, How.CssSelector)
            .SendKeys(longtext);
            Console.WriteLine("Set text Area with characters of length: " + length);
        }
Beispiel #5
0
 public string getTextBoxValue(string selector, How how)
 {
     return(SiteDriver.FindElement(selector, how).GetAttribute("value"));
 }
Beispiel #6
0
        public void SelectCountry(string country)
        {
            SelectElement selectElement = new SelectElement(SiteDriver.FindElement(_demoPage.country, How.CssSelector));

            selectElement.SelectByText(country);
        }
Beispiel #7
0
 public void SetHobbies(string strHobbies)
 {
     SiteDriver.FindElement(_demoPage.hobbies, How.CssSelector)
     .Clear();
     SiteDriver.SendKeys(_demoPage.hobbies, How.CssSelector, strHobbies);
 }
Beispiel #8
0
 public void SetPassword(string strPassword)
 {
     SiteDriver.FindElement(_demoPage.password, How.CssSelector)
     .Clear();
     SiteDriver.SendKeys(_demoPage.password, How.CssSelector, strPassword);
 }
Beispiel #9
0
 public void SetContactNo(string strContactNo)
 {
     SiteDriver.FindElement(_demoPage.contactNo, How.CssSelector)
     .Clear();
     SiteDriver.SendKeys(_demoPage.contactNo, How.CssSelector, strContactNo);
 }
Beispiel #10
0
 public void SetIntroduction(string strIntro)
 {
     SiteDriver.FindElement(_demoPage.introduction, How.CssSelector)
     .Clear();
     SiteDriver.SendKeys(_demoPage.introduction, How.CssSelector, strIntro);
 }
Beispiel #11
0
 public void SetZipCode(string strZipCode)
 {
     SiteDriver.FindElement(_demoPage.zipCode, How.CssSelector)
     .Clear();
     SiteDriver.SendKeys(_demoPage.zipCode, How.CssSelector, strZipCode);
 }
Beispiel #12
0
 public void SetState(string strState)
 {
     SiteDriver.FindElement(_demoPage.state, How.CssSelector)
     .Clear();
     SiteDriver.SendKeys(_demoPage.state, How.CssSelector, strState);
 }
Beispiel #13
0
 public void SetCity(string strCity)
 {
     SiteDriver.FindElement(_demoPage.city, How.CssSelector)
     .Clear();
     SiteDriver.SendKeys(_demoPage.city, How.CssSelector, strCity);
 }
Beispiel #14
0
 public void SetFullName(string strFullName)
 {
     SiteDriver.FindElement(_demoPage.fullName, How.CssSelector)
     .Clear();
     SiteDriver.SendKeys(_demoPage.fullName, How.CssSelector, strFullName);
 }
Beispiel #15
0
        public void SelectSkills(string skill)
        {
            SelectElement selectElement = new SelectElement(SiteDriver.FindElement(_demoPage.skills, How.CssSelector));

            selectElement.SelectByText(skill);
        }
Beispiel #16
0
 public void SetEmail(string strEmail)
 {
     SiteDriver.FindElement(_demoPage.email, How.CssSelector)
     .Clear();
     SiteDriver.SendKeys(_demoPage.email, How.CssSelector, strEmail);
 }
Beispiel #17
0
 public void SetUserName(string strUName)
 {
     SiteDriver.FindElement(_demoPage.username, How.CssSelector)
     .Clear();
     SiteDriver.SendKeys(_demoPage.username, How.CssSelector, strUName);
 }