Android Client Login: http://www.cnblogs.com/tobecrazy/p/4579631.html
Appium implementation and emptying edittext:http://www.cnblogs.com/tobecrazy/p/4592405.html
Appium Slide Handling: http://www.cnblogs.com/tobecrazy/p/4612133.html
Chromedriver:http://www.cnblogs.com/tobecrazy/p/4836995.html
Appium Nine Gongge unlock China Merchants Bank Mobile Client app:http://www.cnblogs.com/tobecrazy/p/4881390.html
Hybrid app Webview:http://www.cnblogs.com/tobecrazy/p/4905917.html
MAC Prep Environment 1. Jdkinstallation
2. Xcodeinstallation
3. NodeJSinstallation
4. Appiuminstallation
- Download install Appium for MAC https://bitbucket.org/appium/appium.app/downloads/appium-1.4.13.dmg
- Using Appium-doctor Reference Step 5
5. using Appium Example Demo
- Download Demo Https://github.com/appium/sample-code
- Build out the TestApp in the demo.
- Launch Appium->appium doctor-add app
6.Creating test Cases
- Open Eclipse and add the following code:
PackageCom.dbyl.core;Importorg.openqa.selenium.WebElement;ImportOrg.openqa.selenium.remote.CapabilityType;Importorg.openqa.selenium.remote.DesiredCapabilities;ImportOrg.testng.Assert;ImportOrg.testng.annotations.AfterClass;ImportOrg.testng.annotations.BeforeClass;Importorg.testng.annotations.Test;ImportIo.appium.java_client.ios.IOSDriver;ImportJava.io.File;ImportJava.net.URL;ImportJava.util.concurrent.TimeUnit; Public classIostest {PrivateIosdriver driver; Private BooleanIsinstall =true; @BeforeClass (Alwaysrun=true) Public voidSetUp ()throwsException {//Set up AppiumDesiredcapabilities Capabilities=Newdesiredcapabilities (); Capabilities.setcapability (Capabilitytype.browser_name,"IOS"); Capabilities.setcapability ("PlatformName", "Mac"); Capabilities.setcapability ("DeviceName", "IPhone 6"); Capabilities.setcapability ("Platformversion", "8.4"); //If no need install don ' t add this if(isinstall) {File classpathroot=NewFile (System.getproperty ("User.dir")); File Appdir=NewFile (Classpathroot, "apps"); File app=NewFile (Appdir, "Testapp.app"); System.out.println ("---->" +App.getabsolutepath ()); Capabilities.setcapability ("App", App.getabsolutepath ()); } //Support ChineseCapabilities.setcapability ("Unicodekeyboard", "True"); Capabilities.setcapability ("Resetkeyboard", "True"); Driver=NewIosdriver (NewURL ("Http://127.0.0.1:4723/wd/hub"), capabilities); } @Test Public voidLogin () {//Wait for 20sDriver.manage (). Timeouts (). implicitlywait (20, Timeunit.seconds); //Find login userName and password EditTextWebelement inputbox1 =driver.findelementbyname ("TextField1"); Inputbox1.sendkeys ("12"); Webelement Inputbox2=driver.findelementbyname ("TextField2"); Inputbox2.sendkeys ("65"); Webelement Calcbutton=driver.findelementbyxpath ("//uiaapplication[1]/uiawindow[2]/uiabutton[1")); Calcbutton.click (); Webelement result=driver.findelementbyxpath ("//uiaapplication[1]/uiawindow[2]/uiastatictext[1")); Assert.assertequals (Result.getattribute ("Value"), "77"); } @AfterClass (Alwaysrun=true) Public voidTearDown ()throwsException {driver.quit (); } }
7. Related Information
Video Tutorial: https://www.youtube.com/watch?v=BULjgsTpw2c
Code: Https://github.com/tobecrazy/appiumDemo
Appium for IOS Setup