0

Anyone using Appium for Web Application testing in Android?

Currently i am using Appium for automating my web application in IOS Simulator(IPad) and it is working fine. I want to use it for Android too i.e (Nexus7 Simulator in Mac machine).

I have tried with below desired capabilities...

            DesiredCapabilities capabilities = new DesiredCapabilities();
            capabilities.setCapability("device", "selendroid");
            capabilities.setCapability(CapabilityType.BROWSER_NAME, "");
            capabilities.setCapability(CapabilityType.VERSION, "4.2.2");
            capabilities.setCapability(CapabilityType.PLATFORM, "Mac");
            driver = new RemoteWebDriver(new URL("http://localhost:4723/wd/hub"), capabilities);

But i am getting below error...

Got configuration error, not starting session info: Responding to client with error: {"status":6,"value":{"message":"A session is either terminated or not started (Original error: ENOENT, stat '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.2.sdk/Applications')","errno":34,"code":"ENOENT","path":"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.2.sdk/Applications","origValue":"ENOENT, stat '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.2.sdk/Applications'"},"sessionId":null} POST /wd/hub/session

I am using below versions:-
1) Appium 0.10.4
2) Mac 10.7.5
3) Selenium WebDriver 2.41
4) Android - 4.2.2 API level 17
5) Nexus7 Simulator.

Can anyone help me in solving this issue?

Thanks in Advance!!

mra419
  • 413
  • 4
  • 9
  • 23

1 Answers1

1

You're missing the platformName capability, so it's trying to use iOS's simulator

"errno":34,"code":"ENOENT","path":"/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.2.sdk/Applications"

It's looking for iPhoneSimulator4.2.2.sdk, so it thinks you're using an iPhone simulator and it can't find the directory for version 4.2.2 on iPhone so it fails.

Read the documentation on DesiredCapabilities

Additional issues with your DesiredCapabilities:

You're setting device to selendroid -- you should be setting deviceName to Nexus7 Simulator (or whatever the process name is for that simulator)

Also you're pointing the webdriver to localhost, which I don't think works? It should be 0.0.0.0:4732/wd/hub

Community
  • 1
  • 1
Jess
  • 3,097
  • 2
  • 16
  • 42