You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
#2164
getting org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Environment
Java client version - 9.1.0
Appium server version - 1.22.0
Desktop OS/version used to run Appium if necessary: browserstack
getting error : org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Host info: host: 'TECHNOLOGY-KRIT', ip: '10.50.1.66'
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:536)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:268)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:161)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:90)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:102)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:109)
at com.healthkart.hkAutomation.browser.BrowserFactory.launchBrowser(BrowserFactory.java:29)
at com.healthkart.extentReportUtil.ExtentReportingBaseUtil.setup(ExtentReportingBaseUtil.java:282)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62)
at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:385)
at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:321)
at org.testng.internal.TestInvoker.runConfigMethods(TestInvoker.java:700)
at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:527)
at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173)
at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:824)
at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.logging.LogType;
import org.openqa.selenium.logging.LoggingPreferences;
public class ChromeOptionsCapability {
private ChromeOptionsCapability() {
}
private static ThreadLocal<String> dr = new ThreadLocal<>();
public static String getMethodName() {
return dr.get();
}
public static void setMethodName(String methodName) {
dr.set(methodName);
}
public static void unload() {
dr.remove();
}
public static ChromeOptions setChromeOptions()
{
return new ChromeOptions().addArguments("--disable-notifications")
.addArguments("disable-infobars").addArguments("start-maximized").addArguments("--remote-allow-origins=*");
}
public static ChromeOptions setChromeOptionsSelenoid()
{
HashMap<String, Object> chromePrefs = new HashMap<String, Object>();
chromePrefs.put("intl.accept_languages", "hi");
LoggingPreferences logPrefs = new LoggingPreferences();
logPrefs.enable(LogType.BROWSER, Level.OFF);
logPrefs.enable(LogType.PERFORMANCE, Level.ALL);
ChromeOptions ops = new ChromeOptions();
ops.addArguments("--disable-notifications")
.addArguments("disable-infobars")
.addArguments("start-maximized")
.addArguments("--no-sandbox")
.addArguments("--disable-setuid-sandbox")
.addArguments("disable-dev-shm-usage")
.addArguments("--remote-allow-origins=*");
ops.setExperimentalOption("prefs", chromePrefs);
ops.setCapability("goog:loggingPrefs", logPrefs);
ops.setCapability("browserVersion", "latest");
ops.setCapability("browserName", "chrome");
Map<Object, Object> options = new HashMap<>();
options.put("enableVNC", true);
options.put("enableVideo", false);
options.put("sessionTimeout", "10m");
options.put("name", getMethodName());
Description
getting org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Environment
getting error : org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Host info: host: 'TECHNOLOGY-KRIT', ip: '10.50.1.66'
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:536)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:268)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:161)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:90)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:102)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:109)
at com.healthkart.hkAutomation.browser.BrowserFactory.launchBrowser(BrowserFactory.java:29)
at com.healthkart.extentReportUtil.ExtentReportingBaseUtil.setup(ExtentReportingBaseUtil.java:282)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62)
at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:385)
at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:321)
at org.testng.internal.TestInvoker.runConfigMethods(TestInvoker.java:700)
at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:527)
at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173)
at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:824)
at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
I am using following pom.xml
4.0.0
The text was updated successfully, but these errors were encountered: