A few of my tests are failing only on Circle Ci but they are running on Local. I don’t know the root cause of this:
These are things I have tried so far:
-
Added conditional wait for waiting until an element on the page is visible
-
Used page.waitForLoadState(LoadState.NetworkIdle), page.waitForLoadState(page.waitForLoadState(LoadState.DOMLoaded))
-
Removed the thread-count to 1 assuming if there was any thread-sync issue
@BeforeMethod
public void navigate() {
navigate(“/abc”);
—-
}
Navigate function is defined in the Base class as
public void navigate(String relativeUrl) {
try { // Timeout extra wait for the navigation to happen smoothly
page.navigate(config.getUrl() + relativeUrl, new Page.NavigateOptions().setTimeout(100000));
page.waitForLoadState(LoadState.NETWORKIDLE);
page.waitForLoadState(LoadState.DOMCONTENTLOADED);
}
Any help would be appreciated
Tests are passing in the local but failing on Circle Ci
I increased the navigation time and also added a wait for the load state
but still getting the following error
“Navigation Timeout: Error {
message=’Timeout 100000ms exceeded.
=========================== logs ===========================
navigating to “url/abc”, waiting until “load”
Gurleen Kaur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.