Getting an error as "org.openqa.selenium.WebDriverException: Connection refused: connect " when tried to execute the IOS automation script using appium studio

Getting an error as "org.openqa.selenium.WebDriverException: Connection refused: connect " when tried to execute the IOS automation script using appium studio

org.openqa.selenium.WebDriverException: Connection refused: connect
Build info: version: ‘3.5.2’, revision: ‘10229a9’, time: ‘2017-08-21T17:29:55.15Z’
System info: host: ‘G5CG6524LGZE’, ip: ‘10.16.35.95’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_181’
Driver info: driver.version: IOSDriver

Appium studio version - 12.9.584
IOS version - 13.1.3 ( IOS version did not supported for appium studio 12.1.80. That’s why i installed 12.9.584)

Please give me solution to this

Are you running the script within inside the Appium Studio or Code outside Appium Studio ?

Please try to give more details like code, how are you running the code.

Kishore, Thanks for your time.
I’m running the script via TestNg in Intellij and i connected my IOS device with appium studio

Note - Running the script within the Appium Studio

Please try if your test recording and execution works within Appium Studio to make sure that works.

If that works , I am hoping that you have kept your Appium Studio running while you run your code from IntellJ.

Sorry I did not see the last statement , you say that you are running within Appium Studio and you also say that you are running via TestNG in Intellij.

My suggestion is to run the test by test recording and then run the test via Play button of Appium Studio. If its working then make sure you keep Appium Studio service on and then run code using Intellij

Thanks Kishore… I’ll check now and let you know. :slight_smile:

I ran the apium studio record part.

And below see the configuration i have in my script. It worked fine with appium studio version 12.1.8 when IOS version was 11.3.1

Sorry I do not know about your previous code and context .

Since the Appium Studio runs fine, then check the capabilities code in which Appium Studio generated and mode the current based on that.

Check if the UDID which u r using in the code is same as generated code … the code u pasted hans ConfigurationLibrary.UD_ID now.

Thanks Krishore. After i changed UD_ID, it’s works fine…
I have an urgent question.

Earlier i used the appium studio 12.1.80 version when i used IOS version 11.3.1.
Now, IOS version is 13.1.3 and i’m using 12.9.58.
My question is, Earlier xpath is not suppoting in this appium studio.
Example- Eariler i used //[@placeholder=‘Username’] .
Now it’s showing 4 places when i enter this . If i use (//
[@placeholder=‘Username’])[2] ,then only it’s pointing the place. We dn’t have any changes in our app. Could you please give me a solution

When i tried to use 12.1.8 with IOS version 13.1.3, i got an error.

Please check the previous code and current code . .

  • You might be using instrumentation before and now no instrumentation and vice versa .

If the above is not the case, the xpath can change in different versions of the device. It cannot be guaranteed as same. You can use Xpath 'OR ’ for combining the xpath for compatibility or use other stable locators such as ID.

Thank you Kishore for your great time
Noted