Android : Testing Behat feature with Appium

on Thursday, December 4, 2014


Need to know how to get Behat working with Appium if possible. I currently have on a Ubuntu 14.04 64 bit box, Behat 2.4 with mink 1.4 , Appium 1.33, Android SDK and Selenium server 2.43.


What I have done is run selenium in grid mode and run appium in node mode with a node config file. Appium connects to the grid server successfully.


In my Behat.yml file I have the wd_host as o.o.o.o:4723/wd/hub with capabilities: {"browserName":"Browser","platforName": "Android","deviceName": "Android Emulator"}


when I run this behat profile I get error " Unrecognized options "platformName, deviceName" under "behat.extensions.behat_minkextension_extension.selenium2.capabilities"


Based on Appium info those capabilities are required for Appium.


I am trying to test a mobile-web based url on the SDK emulator.


Here is the nodeconfig.json file that I use to connect Appium to the grid server:


{ "capabilities": [ { "browserName": "Browser", "deviceType": "tes", "version":"*", "maxInstances": 5, "platform":"Android" } ], "configuration": { "cleanUpCycle":2000, "timeout":30000, "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",

"url":"http://o.o.o.o:4723/wd/hub", "host": "127.o.o.1", "port": 4723, "maxSession": 5, "register": true, "registerCycle": 5000, "hubPort": 4444, "hubHost": "127.0.0.1" } }


Here is the yml file: Android: context: class: 'FeatureContext' extensions: Behat\MinkExtension\Extension: base_url: 'myurl' #default_session: selenium2 javascript_session: 'selenium2' selenium2: browser: 'android' wd_host: http://o.o.o.o:4723/wd/hub capabilities: {"browserName":"Browser","platformName":"Android","deviceName":"tes"}


The O's are zero, just can't post more then one link.


0 comments:

Post a Comment