Replies: 1 comment
-
found the issue |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Serenity Version: 4.0.14
Running over : sauceLabs
CI/CD - Jenkins
Locally job pass and using this mvn command
mvn clean verify -Denvironment=chrome_webdriver -Dtags=@xxx -DmyVariable='oa'
and in Jenkin I am using
clean verify -Denvironment=chrome_webdriver -Dtags=@xxx -DmyVariable='oa'
When I run locally to saucelab it pass
mvn clean verify -Denvironment=run_with_saucelabs_web -Dtags=@xxx -DmyVariable='oa'
but only failing when it run in Jenkin
@given("that a user navigates to the web page")
public void thatAUserNavigatesToTheWebPage() throws MalformedURLException {
String sAffiliatedValue = commonActions.getEnvString("myVariable").toLowerCase();
String siteURL = commonActions.getEnvString(sAffiliatedValue+".url");
System.out.println("siteURL =>"+ siteURL);
commonActions.storeSessionData(sAffiliatedValue);
commonActions.navigateTo(siteURL);
}
public String getEnvString(String key){
return environmentVariables.getProperty(key);
}
public static void untilPageReadyState(WebDriver webDriver, Duration timeOutInSeconds) {
until(webDriver, timeOutInSeconds, (function) -> {
String isPageLoaded = String.valueOf(((JavascriptExecutor) webDriver).executeScript("return document.readyState"));
if (isPageLoaded.equals("complete")) {
System.out.println("Document is Ready");
return true;
} else {
System.out.println("Document is loading");
return false;
}
});
}
This is my serenity.conf file
chrome_webdriver {
webdriver {
driver = chrome
autodownload = true
}
headless.mode = false
#
# Chrome options can be defined using the chrome.switches property
#
chrome.switches = """--remote-allow-origins=*;--start-maximized;--test-type;--no-sandbox;--ignore-certificate-errors;--disable-popup-blocking;--disable-default-apps;--disable-extensions-file-access-check;--incognito;--disable-infobars,--disable-gpu"""
}
Getting error on this line
getDriver().navigate().to(goToURL);
Giving error in Jenkins
[ERROR] Errors:
[ERROR] Could not instantiate class org.openqa.selenium.chrome.ChromeDriver
[ERROR] Could not instantiate class org.openqa.selenium.chrome.ChromeDriver
What I am doing wrong. pls let me know.
Beta Was this translation helpful? Give feedback.
All reactions