Not able to find the appium.js file where it is located in local system, though installed Appium Desktop V1.7.2
Earlier I used to install Appium and able to see the Appium folder and the Appium.js file, where as in the new Appium desktop version V1.7.2 downloaded using .msi, now not able to see the Appium folder where it is installed either program files ( or program files x86 too). Pls let me know where I can find the same Appium.js file in the latest appium. Trying to automate the appium server through java code to that we need appium.js and node.exe paths where that are located
Any idea about to start appium through code for new Appium Desktop, shall i use main.js or appium.js itself. I tried both the ways but getting exception as below
I’m facing the below exception with Appium-Desktop v1.3.2 (downloaded from appium.io), and trying to connect to appium server but not connecting to server. pls let me know the issue
in the latest version of Appium-Desktop do we need to provide main.js or appium.js file in the commandLineArgument. i tried both but still giving the error.
============================Code i’ve used==================
System.out.println(“Starting appium server”);
/CommandLine cmd = new CommandLine(“cmd”);
cmd.addArgument(“cmd”);
cmd.addArgument("/C");/
/* cmd.addArgument(“C:\Users\satheeshnukala\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\lib\appium.js”); // commented the appium.js and used main.js file */
CommandLine cmd = new CommandLine(“C:\Program Files\nodejs\node.exe”); //cmd.addArgument(“C:\Program Files\nodejs\node.exe”);
cmd.addArgument(“C:\Users\satheeshnukala\AppData\Local\Programs\appium-desktop\resources\app\main.js”);
cmd.addArgument("–address");
cmd.addArgument(“127.0.0.1”);
cmd.addArgument("–port");
cmd.addArgument(“4723”);
cmd.addArgument("–no-reset",true);
cmd.addArgument("–full-reset",false);
cmd.addArgument("–log");
cmd.addArgument(“C:\Users\satheeshnukala\workspace\AppiumTest\ConsoleLogs\AppiumConsoleLogs.txt”);
==================Exception by using main.js===========================
Starting appium server
Started appium server
Step-1
Step-2
Error: Cannot find module ‘electron’
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.module.exports.Object.defineProperty.value (C:\Users\satheeshnukala\AppData\Local\Programs\appium-desktop\resources\app\webpack:\external “electron”:1:1)
at webpack_require (C:\Users\satheeshnukala\AppData\Local\Programs\appium-desktop\resources\app\webpack:\webpack\bootstrap dfa496e38cddd9338602:19:1)
at Object. (C:\Users\satheeshnukala\AppData\Local\Programs\appium-desktop\resources\app\webpack:\app\main\main.development.js:1:1)
at webpack_require (C:\Users\satheeshnukala\AppData\Local\Programs\appium-desktop\resources\app\webpack:\webpack\bootstrap dfa496e38cddd9338602:19:1)
at Object. (C:\Users\satheeshnukala\AppData\Local\Programs\appium-desktop\resources\app\main.js:50:19)
at webpack_require (C:\Users\satheeshnukala\AppData\Local\Programs\appium-desktop\resources\app\webpack:\webpack\bootstrap dfa496e38cddd9338602:19:1)
Exception in thread “main” org.openqa.selenium.WebDriverException: Connection refused: connect
Build info: version: ‘3.9.1’, revision: ‘63f7b50’, time: ‘2018-02-07T22:42:28.403Z’
System info: host: ‘10INLPC0BS59M’, ip: ‘10.216.42.151’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_144’
Driver info: driver.version: AndroidDriver
at io.appium.java_client.remote.AppiumCommandExecutor.lambda$2(AppiumCommandExecutor.java:141)
at java.util.Optional.orElseGet(Optional.java:267)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:140)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
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:219)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:142)
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:77)
at AppiumPackage.AppiumServerJava.startServer(AppiumServerJava.java:62)
at AppiumPackage.AppiumServerJava.main(AppiumServerJava.java:110)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:75)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:359)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:381)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:111)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at org.openqa.selenium.remote.internal.ApacheHttpClient.fallBackExecute(ApacheHttpClient.java:151)
at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:91)
at org.openqa.selenium.remote.internal.ApacheHttpClient.execute(ApacheHttpClient.java:69)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:101)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:138)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:129)
… 12 more