Exemplo n.º 1
0
        /// <summary>
        ///     Sign in to the PegasusCRM .info test site with the specified username/password.
        /// </summary>
        /// <param name="user">The username to use for logging in.</param>
        /// <param name="pass">The password to use for logging in.</param>
        /// <returns>The Browser instance.</returns>
        private static Browser LoginCom(string user, string pass)
        {
            string url = XmlReader.Read("Config/Config.xml").dotcom;
            var login = new LocatorReader("Login.xml");

            var browser = new Browser().GoToUrl(url).Maximize();
            browser.FillForm(login.Get("username"), user);
            browser.FillForm(login.Get("password"), pass);
            browser.Click(login.Get("submit-button"));
            browser.ImplicitWait = 10;
            return browser;
        }