When it comes to app automation, you're often asked how to know the app's package name and launch page name. The question is simple:1. The most direct way to ask development ah, they tell you the app's package name and start page.2. If you are shy and can see/understand the code, get the code and get it out.1) If it is an in-house app, download the latest code, then go to the code to find the package name and start page.2) If it is not the company's a
ObjectiveEvery time I write PageObject positioning element object is too cumbersome, the format is similar, just change the positioning method, this can only be a template way, batch generated pageobject positioning element Object templatePython generates a template with two modules to choose from: Templet and MakoSimply put, the purpose of this implementation is to use code to automatically generate code to automate codeThen the previous article: Appium
When you do UI Automation with Appium, you'll find that test reports are important and important in test reports.Because many companies use Jenkins as a continuous integration tool, the people who perform automated tests see what automation is running, where it fails, and what critical nodes are required for.How to do it, the current project is so implemented:1.
ObjectiveWhat does the SDK manager have to install?First, the SDK Manager1. Double-click Open SDK Manager interface2.Tools inside the top three is a must download--android SDK Tools has a variety of utilities, such as: Uiautomatorviewer,uiautomatorviewer,uiautomatorviewer--android SDK Platform-tools There are adb,adb,adb--android SDK Build-tools There are appt,aapt,appt3.SDK platform Next up, it can be backwards compatible.4.Extras here, choose the following three.--android Support Respository A
public class Screenshot {public static void screenshot (Androiddriver driver,string screenname) throws ioexception{Set the time formatSimpleDateFormat formatter=new SimpleDateFormat ("Yyyy-mm-dd-mm-ss");Generate timestampString datestring =formatter.format (New Date ());String dir_name=system.getproperty ("User.dir") + "\ \ abnormal picture";System.out.println ("Exception picture directory" +dir_name);Because there may be abnormal pictures and when it is possible to delete, so this side first de
Appium Android Automation FAQs1, SeesionnotcreatedexceptionMeet this first to determine that the JDK requires more than 1.7Then also make sure that Appium is in the boot state and can be cmd restarted under Appium2, WebdriverexceptionThis issue can be viewed Appium logIt can be seen that the package name is not found,
‘]=‘.XXSearchActivity‘
desired_caps[‘unicodeKeyboard‘]=True
desired_caps[‘resetKeyboard‘]=True
driver = webdriver.Remote(‘http://localhost:4723/wd/hub‘, desired_caps)
driver.find_elements_by_name("搜索话题")
driver.find_element_by_class_name("android.widget.EditText").send_keys(u"可爱")
# driver.find_element_by_id(‘et_searchactivity_search‘).send_keys(u"可爱")
driver.find_element_by_name("搜索").click()
Time.sleep (5)//Pause on page for 5 seconds
driver.quit()
From for not
.
Swipe
Analog phone slide, swipe from one point to another, the keyword receives 5 parameters [start_x | start_y | end_x | end_y | duration=1000], when sliding, the position of the point is in the form of coordinates.
Tap
This keyword simulates clicking on a screen element and receiving a parameter [locator]
Zoom
This keyword is used to magnify an element and receive three parameters [Locator | percent=200% | steps=1], the first parameter
The Python script implements automated testing for mobile applications on the Appium library, pythonappium
The coolest thing about automated functional testing with Appium is that you can write your test code in any language that best fits your testing tool. One of the most popular test programming languages is Python. It is very easy to write test code for iOS a
Brief introductionUI Automation testing for mobile apps has long been a difficult problem, with the "change" of the UI changing, resulting in extensive maintenance of automated use cases. From the perspective of layered testing, automated testing should be done on a level-by-layer basis. The largest number of automated tests should be unit testing, the easiest to implement and the easiest to detect problems
Cryanimal qq:164166060 This article briefly introduces the architecture of the Appnium Automation framework, the loading process, supported languages, related configurations, and element positioning tools. Official website:Http://appium.io Appnium is supported by Saucelabs, an industry-leading Test product company with proven enterprise testing solutions Platforms supported by Appium
Android uses
BackgroundThe company's products business has developed to the mobile side, the development of the selection has ended, decided to use PHONEGAP Mobile Web application development platform. Considering the complexity and diversity of the business, mobile-side testing also needs to be automated. Read a lot on the net, finally locked up 3
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.