Translate

Monday, August 8, 2016

Mobile Automation


For IOS and Android, the most common one is Appium. This can be used for both and is really handy because you can write the scripts in almost any programming language.
Like Selenium webdriver, Appium in and of itself is a ‘webdriver’ of sorts. So at the beginning of your test you create your appium driver.
This specific code for appium is java but you could adapt it to other languages.
Once you have it added to the test class. You can actually setup the things needed to run a automation test for IOS
So in this code snippet you can see that this is configuring to run on a iphone 6 in ios 9.3. For Android it's almost the same you just use a Android for both the deviceName and the platforVersion. In Android you have the cool option of installing the apk each time you run through a test. Whereas in IOS you don’t have the luxury.

Once you have the basics down you now can right a test.
This is a sample test from an Appium based Android test.

For more examples / help refer to these site.


No comments :

Post a Comment