1

When trying to invoke android driver using java with below mentioned statement

andriodDriver = new AndroidDriver<WebElement>(hubURL, capabilities);

Below mentioned exception is displayed, org.openqa.selenium.WebDriverException: Connection refused: connect Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z' System info: host: 'INBONAMP', ip: '10.240.97.163', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_161' Driver info: driver.version: AndroidDriver

Capabilities Defined :

app=C:\Automation\gsm2.apk, 
appactivity=.GSM2Activity, 
newCommandTimeout=0, 
apppackage=com.eyc.gsm2, 
locationContextEnabled=true, 
automationName=UiAutomator2, 
autoWebView=true, 
androidDeviceSocket=com.eyc.gsm2_devtools_remote, 
platformName=Android, 
deviceName=SANDU4S8SBUQKQGKRWC

When I have started Appium manually its working fine and I am able execute tests on the appium server.

Amit Jain
  • 4,389
  • 2
  • 18
  • 21
Priyanka
  • 31
  • 9
  • can u share more server logs and specify where u are executing tests on real device and reason for using this capability - androidDeviceSocket ? – Amit Jain Oct 05 '18 at 10:21
  • Check [this](https://stackoverflow.com/questions/52474999/how-to-fix-python-selenium-error-connection-refused-when-initializing-a-seleni/52537137#52537137) and [this](https://stackoverflow.com/questions/47920639/how-to-fix-webdriverexception-message-connection-refused/47921529#47921529) discussion. – undetected Selenium Oct 05 '18 at 11:04

0 Answers0