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!!

1 Answer 1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.