In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "the building steps of automated testing appium". In daily operation, I believe many people have doubts about the building steps of automated testing appium. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "building steps of automated testing appium". Next, please follow the editor to study!
I am here to use java for connection implementation of automated testing.
1. Install java
(1)。 Download the java installation package
(2)。 Configure environment variables
(3)。 Enter java-version in the dos window to view the correct installation if you output the result
two。 Install android SDK
(1)。 Download androidSDK
Unzip the downloaded Android SDK and you will get the following directory.
(2)。 Set the Android environment variable
3. Install appium Server
1. Download https://bitbucket.org/appium/appium.app/downloads/
two。 Install step by step, and remember the installation directory
3. Configure environment variables
Finally, open the Windows command prompt and enter the "appium-doctor" command. If the following prompt appears, it means that all the environments you need for Appium are ready.
4. Open elipse or idea
Create a maven project
Introduce
Io.appiumjava-client5.0.0-BETA9testimport io.appium.java_client.android.AndroidDriver;import org.openqa.selenium.By;import org.openqa.selenium.remote.DesiredCapabilities;import java.net.URL;/** * Created by dell on 2017-10-24. * / public class TestAppium {public static void main (String [] arg) throws Exception {DesiredCapabilities capabilities = new DesiredCapabilities (); capabilities.setCapability ("deviceName", "Android Emulator"); capabilities.setCapability ("automationName", "Appium"); capabilities.setCapability ("platformName", "Android"); capabilities.setCapability ("platformVersion", "23"); capabilities.setCapability ("app", "D:\\ app-debug.apk") / / capabilities.setCapability ("appPackage", "circle.fhw.com.friendcircle"); / / capabilities.setCapability ("appActivity", ".TestAct"); System.out.println ("Connect androidServer"); AndroidDriver driver = new AndroidDriver (new URL ("http://127.0.0.1:4723/wd/hub"), Act); System.out.println (" start testing ") Driver.findElement (By.id ("btn_test")). Click (); System.out.println ("end of test"); Thread.sleep (2000); / / String result = driver.findElement (By.id ("com.android.calculator2:id/formula")). GetText (); / / System.out.println (result); driver.quit ();}}
5. Start the android project
Start appium
View the execution result
At this point, the study of "Building steps for Automated Test appium" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.