public void Login(string email, string password)
        {
            bool isloginreqd = SeleniumHelper.IsElementPresent(_driver, By.Id("email"), TimeSpan.FromSeconds(7));

            if (isloginreqd)
            {
                EmailId.Clear();
                EmailId.SendKeys(email);
                Password.Clear();
                Password.SendKeys(password);
                SignIn.Click();
            }
        }
Exemplo n.º 2
0
        public void edit_customer(string field_to_change, string add, string city, string state, string pin, string mobile, string email)
        {
            // DatabaseConnectorFixture db = new DatabaseConnectorFixture();
            // values=db.executeQuery(query);
            try
            {
                if (field_to_change.Equals("address"))
                {
                    Address.Clear();
                    Address.SendKeys(add);
                }
                if (field_to_change.Equals("city"))
                {
                    City.Clear();
                    City.SendKeys(city);
                }
                if (field_to_change.Equals("state"))
                {
                    State.Clear();
                    State.SendKeys(state);
                }
                if (field_to_change.Equals("pin"))
                {
                    PinNo.Clear();
                    PinNo.SendKeys(pin);
                }
                if (field_to_change.Equals("mobile"))
                {
                    TelephoneNo.Clear();
                    TelephoneNo.SendKeys(mobile);
                }
                if (field_to_change.Equals("email"))
                {
                    EmailId.Clear();
                    EmailId.SendKeys(email);
                }

                IJavaScriptExecutor js = (IJavaScriptExecutor)driver;
                js.ExecuteScript("window.scrollTo(0, document.body.scrollHeight);");
                // Assert.Equal("dfdg", driver.Title);
                WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(20));
                wait.Until(ExpectedConditions.ElementToBeClickable(Submit)).Click();
            }

            catch (Exception e)
            {
                Console.WriteLine(e);
                TakeScreenshot.takeScreenshotAs(driver, "edit_customer");
            }
        }
Exemplo n.º 3
0
 public void EditPackageBusinessEmailId()
 {
     EmailId.Clear();
     EmailId.SendKeys(ExcelOperation.GetData[2]);
 }