コード例 #1
0
        private bool PutDriverInStartingState(IWebDriver driver)
        {
            // Encode a token to use for the site.
            //int companyId = 8604;
            //int companyId = 9042;
            // 8708 = Winner Subaru VW
            int companyId = 8708;
            int? customerId = null;
            //var cipher =  eLead.Common.Helpers.ModifiedBase64Encryption.Create(new List<string>() { "rueven", "snarffles" });
            var parts = System.Web.HttpUtility.ParseQueryString(string.Empty);
            parts.Add("cid", companyId.ToString());
            parts.Add("uid", customerId.ToString());
            var unencodedToken = parts.ToString();
            var token = "";// cipher.Encode(unencodedToken);

            driver.Navigate().GoToUrl("http://192.168.1.75/selfserve/?token=" + token);
            driver.SetTestMode(true);
            // Wait until we have booted.
            driver.Wait(10, d => d.GetCurrentControllerName() != "undefined");
            // Wait until the jQuery is ready.
            driver.Wait(180, d => d.JQueryIsLoaded());
            return true;
        }