Exemplo n.º 1
0
        public void VerifyCurrentUrl()
        {
            try
            {
                string actualUrl = Driver.Url;
                var    wait      = new DefaultWait <DriverWrapper>(Driver);
                wait.Timeout         = TimeSpan.FromSeconds(TestConfiguration.PageLoadTimeout);
                wait.PollingInterval = TimeSpan.FromMilliseconds(TestConfiguration.PollingInterVal);;
                wait.Message         = "The actual page URL: '" + actualUrl + "' does not contain the expected page URL: '" + this.ExpectedUrl + "'.";
                wait.Until((d) => { return(d.Url.ToLower().Contains(ExpectedUrl.ToLower())); });

                Logger.Info("Verifed the actual URL: {0} contains the expected URL: {1}.", actualUrl, ExpectedUrl);
            }
            catch (Exception e)
            {
                Logger.Error(e);
                throw;
            }
        }
Exemplo n.º 2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (FileName.Length != 0)
            {
                hash ^= FileName.GetHashCode();
            }
            if (Description.Length != 0)
            {
                hash ^= Description.GetHashCode();
            }
            if (Bucket.Length != 0)
            {
                hash ^= Bucket.GetHashCode();
            }
            if (Object.Length != 0)
            {
                hash ^= Object.GetHashCode();
            }
            if (Method.Length != 0)
            {
                hash ^= Method.GetHashCode();
            }
            if (Expiration != 0L)
            {
                hash ^= Expiration.GetHashCode();
            }
            if (timestamp_ != null)
            {
                hash ^= Timestamp.GetHashCode();
            }
            if (ExpectedUrl.Length != 0)
            {
                hash ^= ExpectedUrl.GetHashCode();
            }
            hash ^= Headers.GetHashCode();
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }