Exemplo n.º 1
0
        public void RandomStale() => Execute(attempts: 5, test: () =>
        {
            // setup
            var iterations = 0;

            // iterate
            while (iterations < 1)
            {
                try
                {
                    MockWebElement.GetElement(new MockWebDriver(), MockBy.RandomStale());
                }
                catch (Exception e) when(e is StaleElementReferenceException)
                {
                    iterations++;
                }
            }

            // assertion
            Assert.IsTrue(iterations > 0);
        });