Scenario: launch chrome in appium
* configure driver =
"""
{
type: 'android',
webDriverPath : "/wd/hub",
start: true,
httpConfig : { readTimeout: 120000 }
}
"""
* def desiredConfig =
"""
{
"newCommandTimeout" : 300,
"platformVersion" : "9.0",
"platformName" : "Android",
"connectHardwareKeyboard" : true,
"deviceName" : "emulator-5554",
"avd" : "Pixel2",
"automationName" : "UiAutomator2",
"browserName" : "Chrome"
}
"""
* driver { webDriverSession: { desiredCapabilities : "#(desiredConfig)"} }
* driver 'http://google.com'
* driver.input("//input[@name='q']", 'karate dsl')
I have done UI web testing with karate, Django. But facing issue when try to test the mobile app.
I installed:-
- android studio
- node js
- npm
- appium-doctor
Error message when running sample test:-
ExamplesTest driver config / start failed: webdriver session create status 500, {"status":13,"value":{"message":"An unknown server-side error occurred while processing the command. Original error: Neither ANDROID_HOME nor ANDROID_SDK_ROOT environment variable was exported. Read https://developer.android.com/studio/command-line/variables for more details"},"sessionId":null}, options: {type=android, webDriverPath=/wd/hub, start=true, httpConfig={readTimeout=120000}, target=null, webDriverSession={desiredCapabilities={newCommandTimeout=300, platformVersion=9.0, platformName=Android, connectHardwareKeyboard=true, deviceName=emulator-5554, avd=Pixel2, automationName=UiAutomator2, browserName=Chrome}}} classpath:test/test_features/android/android.feature:59
need help to solve this. Can someone help