Running Appium Server Programmatically | Appium Installation For Android - 14

Running Appium Server Programmatically | Appium Installation For Android - 14 3 min

Running Appium server programmatically

QA Section

Speak Your Mind


Ken

Hi Has anyone experienced this issue before? I wasn't able to start the server programmatically SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. usage: C:\Users\Kenne\AppData\Roaming\npm\node_modules\appium\build\lib\main.js [-h] [--shell] [--allow-cors] [--reboot] [--ipa IPA] [-a ADDRESS] [-p PORT] [-pa BASEPATH] [-ka KEEPALIVETIMEOUT] [-ca CALLBACKADDRESS] [-cp CALLBACKPORT] [-bp BOOTSTRAPPORT] [-r BACKENDRETRIES] [--session-override] [-l] [-g LOGFILE] [--log-level {info,info:debug,info:info,info:warn,info:error,warn,warn:debug,warn:info,warn:warn,warn:error,error,error:debug,error:info,error:warn,error:error,debug,debug:debug,debug:info,debug:warn,debug:error}] [--log-timestamp] [--local-timezone] [--log-no-colors] [-G WEBHOOK] [--safari] [--default-device] [--force-iphone] [--force-ipad] [--tracetemplate AUTOMATIONTRACETEMPLATEPATH] [--instruments INSTRUMENTSPATH] [--nodeconfig NODECONFIG] [-ra ROBOTADDRESS] [-rp ROBOTPORT] [--chromedriver-executable CHROMEDRIVEREXECUTABLE] [--show-config] [--no-perms-check] [--strict-caps] [--isolate-sim-device] [--tmp TMPDIR] [--trace-dir TRACEDIR] [--debug-log-spacing] [--suppress-adb-kill-server] [--long-stacktrace] [--webkit-debug-proxy-port WEBKITDEBUGPROXYPORT] [--webdriveragent-port WDALOCALPORT] [-dc DEFAULTCAPABILITIES] [--relaxed-security] [--allow-insecure ALLOWINSECURE] [--deny-insecure DENYINSECURE] [--command-timeout DEFAULTCOMMANDTIMEOUT] [-k] [--platform-name PLATFORMNAME] [--platform-version PLATFORMVERSION] [--automation-name AUTOMATIONNAME] [--device-name DEVICENAME] [--browser-name BROWSERNAME] [--app APP] [-lt LAUNCHTIMEOUT] [--language LANGUAGE] [--locale LOCALE] [-U UDID] [--orientation ORIENTATION] [--no-reset] [--full-reset] [--app-pkg APPPACKAGE] [--app-activity APPACTIVITY] [--app-wait-package APPWAITPACKAGE] [--app-wait-activity APPWAITACTIVITY] [--device-ready-timeout DEVICEREADYTIMEOUT] [--android-coverage ANDROIDCOVERAGE] [--avd AVD] [--avd-args AVDARGS] [--use-keystore] [--keystore-path KEYSTOREPATH] [--keystore-password KEYSTOREPASSWORD] [--key-alias KEYALIAS] [--key-password KEYPASSWORD] [--intent-action INTENTACTION] [--intent-category INTENTCATEGORY] [--intent-flags INTENTFLAGS] [--intent-args OPTIONALINTENTARGUMENTS] [--dont-stop-app-on-reset] [--calendar-format CALENDARFORMAT] [--native-instruments-lib] [--keep-keychains] [--localizable-strings-dir LOCALIZABLESTRINGSDIR] [--show-ios-log] [--async-trace] [--chromedriver-port CHROMEDRIVERPORT] [--log-filters LOGFILTERS] [-v] C:\Users\Kenne\AppData\Roaming\npm\node_modules\appium\build\lib\main.js: error: argument -dc/--default-capabilities: invalid parseDefaultCaps value: '{app:C:\\\\users\\\\kenne\\\\mkmt.apk,deviceName:BV9900EQEEA003536,platformName:Android,platformVersion:10,udid:BV9900EQEEA003536}'

Reply

Ken

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. usage: C:\Users\Kenne\AppData\Roaming\npm\node_modules\appium\build\lib\main.js [-h] [--shell] [--allow-cors] [--reboot] [--ipa IPA] [-a ADDRESS] [-p PORT] [-pa BASEPATH] [-ka KEEPALIVETIMEOUT] [-ca CALLBACKADDRESS] [-cp CALLBACKPORT] [-bp BOOTSTRAPPORT] [-r BACKENDRETRIES] [--session-override] [-l] [-g LOGFILE] [--log-level {info,info:debug,info:info,info:warn,info:error,warn,warn:debug,warn:info,warn:warn,warn:error,error,error:debug,error:info,error:warn,error:error,debug,debug:debug,debug:info,debug:warn,debug:error}] [--log-timestamp] [--local-timezone] [--log-no-colors] [-G WEBHOOK] [--safari] [--default-device] [--force-iphone] [--force-ipad] [--tracetemplate AUTOMATIONTRACETEMPLATEPATH] [--instruments INSTRUMENTSPATH] [--nodeconfig NODECONFIG] [-ra ROBOTADDRESS] [-rp ROBOTPORT] [--chromedriver-executable CHROMEDRIVEREXECUTABLE] [--show-config] [--no-perms-check] [--strict-caps] [--isolate-sim-device] [--tmp TMPDIR] [--trace-dir TRACEDIR] [--debug-log-spacing] [--suppress-adb-kill-server] [--long-stacktrace] [--webkit-debug-proxy-port WEBKITDEBUGPROXYPORT] [--webdriveragent-port WDALOCALPORT] [-dc DEFAULTCAPABILITIES] [--relaxed-security] [--allow-insecure ALLOWINSECURE] [--deny-insecure DENYINSECURE] [--command-timeout DEFAULTCOMMANDTIMEOUT] [-k] [--platform-name PLATFORMNAME] [--platform-version PLATFORMVERSION] [--automation-name AUTOMATIONNAME] [--device-name DEVICENAME] [--browser-name BROWSERNAME] [--app APP] [-lt LAUNCHTIMEOUT] [--language LANGUAGE] [--locale LOCALE] [-U UDID] [--orientation ORIENTATION] [--no-reset] [--full-reset] [--app-pkg APPPACKAGE] [--app-activity APPACTIVITY] [--app-wait-package APPWAITPACKAGE] [--app-wait-activity APPWAITACTIVITY] [--device-ready-timeout DEVICEREADYTIMEOUT] [--android-coverage ANDROIDCOVERAGE] [--avd AVD] [--avd-args AVDARGS] [--use-keystore] [--keystore-path KEYSTOREPATH] [--keystore-password KEYSTOREPASSWORD] [--key-alias KEYALIAS] [--key-password KEYPASSWORD] [--intent-action INTENTACTION] [--intent-category INTENTCATEGORY] [--intent-flags INTENTFLAGS] [--intent-args OPTIONALINTENTARGUMENTS] [--dont-stop-app-on-reset] [--calendar-format CALENDARFORMAT] [--native-instruments-lib] [--keep-keychains] [--localizable-strings-dir LOCALIZABLESTRINGSDIR] [--show-ios-log] [--async-trace] [--chromedriver-port CHROMEDRIVERPORT] [--log-filters LOGFILTERS] [-v] C:\Users\Kenne\AppData\Roaming\npm\node_modules\appium\build\lib\main.js: error: argument -dc/--default-capabilities: invalid parseDefaultCaps value: '{app:C:\\\\users\\\\kenne\\\\mkmt.apk,deviceName:BV9900EQEEA003536,platformName:Android,platformVersion:10,udid:BV9900EQEEA003536}' Hi has anyone experienced this before? How did you resolve it?

Reply

Nirmal

I am not able to start server programmatically. I have followed the code step by step and i receive below error. Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at io.appium.java_client.service.local.AppiumDriverLocalService.(AppiumDriverLocalService.java:57) at LaunchMkmt.main(LaunchMkmt.java:54) Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 2 more

Reply

Akshay

Hi I am not able to start the server pragmatically. Error: org.openqa.selenium.WebDriverException: Connection refused: connect Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z' System info: host: 'LAPTOP-NSHOK0TM', ip: '192.168.56.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.2' Driver info: driver.version: AndroidDriver at io.appium.java_client.remote.AppiumCommandExecutor.lambda$2(AppiumCommandExecutor.java:243) at java.base/java.util.Optional.orElseGet(Optional.java:369) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:242) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:207) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:130) at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:38) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:84) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:94) at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:93) at testcases.LaunchMkMT.main(LaunchMkMT.java:43) Caused by: java.net.ConnectException: Connection refused: connect at java.base/java.net.PlainSocketImpl.waitForConnect(Native Method) at java.base/java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:107) at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403) at java.base/java.net.Socket.connect(Socket.java:591) at okhttp3.internal.platform.Platform.connectSocket(Platform.java:125) at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:238) at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:158) at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:256) at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:134) at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:113) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:125) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200) at okhttp3.RealCall.execute(RealCall.java:77) at org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:105) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:101) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:185) at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:209) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:231) ... 11 more

Reply