Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97762

Selenium tests fail with azure pipeline sometimes and pass locally

$
0
0

Test cases fail while not finding a link or any validation messages after a button click.

I used explicit waits for page to load:

var waitForDocumentReady = new WebDriverWait(WebDriver, TimeSpan.FromSeconds(10));
            waitForDocumentReady.Until((wdriver) => (WebDriver as IJavaScriptExecutor).ExecuteScript("return document.readyState").Equals("complete"));

For wait specific div of validation messages:

 WebDriverWait wait = new WebDriverWait(WebDriver, TimeSpan.FromSeconds(10));
            wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementExists(By.ClassName("validationErrors")));

But test cases pass sometimes with pipeline and fails sometimes.


Viewing all articles
Browse latest Browse all 97762

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>