view:" + text);}return Getsuccessresult (Result);} catch (Final Uiobjectnotfoundexception e) {return new Androidcommandresult (Wdstatus.no_such_element, E.getmessage ());} catch (Final NullPointerException e) {//El is nullreturn new Androidcommandresult (Wdstatus.no_such_element, E.getmessage ());} catch (Final Exception e) {return new Androidcommandresult (Wdstatus.unknown_error, E.getmessage ());}}}In Uiautomator, it is sometimes necessary to find an item in a scrolling list, and this item is
not output ).
Sample Input
3 11 12 13 121 22 10 01 12 1 25 30 05 31 21 225 2131 2 32 4 521 50 0
Sample output
2.00Can not be reached!21.65 Train of Thought: Set DP [I] [J] to represent the smallest step number from the point I to the state of the automatic machine to J. Note that we construct an automatic machine based on an invalid path, therefore, we cannot reach the end of a certain path. Based on this, we can record our termination conditions.
#include
HDU-4511 Jam
. If you do not add "start/b", start the Appium service and stay in the Appium log state, will not return to execute the subsequent Python script.Third, stop Appium serviceWhen the use case finishes, close the current Appium service. The implementation is that the Python script calls bat to close the Appium service. The Python script passes the port of the Appium server into the bat, the bat script obtains its process PID based on the port number, and then gets the app name and closes through Ta
Write in front:
Appium environment is set up, Genymotion Simulator is also configured OK, then began to write the first demo
First, get the APK package name
Open cmd, enter the instruction AAPT dump badging D:\test\xxx.apk (full name of the APK, such as magic Diffuse camera apk). If the package name is obtained through Appium, it may not be accurate.
Package Name: com.manboker.headportrait
Ii. acquisition of Launcheract
(Os.path.dirname (Os.path.realpath (__file__))) # Locate the current folderJpgpath = Os.path.join (Parpath, ' testdata ', ' 1.jpg ') # "TestData": the folder name where the file is stored, "1.jpg": File nameClass Testsendfile (UnitTest. TestCase):@classmethoddef setupclass (CLS):CLS.S = Requests.session ()# Instantiate the called ClassCls.login = Loginzentao (CLS.S) # Instantiate class Loginzentao as ObjectCls.send = SendFile (CLS.S) # Instantiate the Class SendFile () as an objectdef test_01 (
the action to get the page element, click the button, and enter the form.the Selenium offers 8 positioning methods:
Id
Name
Class name
Tag name
Link text
Partial link text
Xpath
CSS Selector
here are the 8 ways to locate in the code:
Findelement (By.id ())
Findelement (By.name ())
Findelement (By.classname ())
Findelement (By.tagname ())
Findelement (By.linktext ())
Findelement (By.partiallinktext ())
Findelement (By.xpa
Interface 2: LoginRequest Method: PostRequest URL:http://api.nnzhp.cn/api/user/login1. Open JMeter, right click on test Plan, select Add-threads-thread Group2, click on Thread Group, right-add sampler-http request3,http Request page, server name or IP field input: api.nnzhp.cn; mode selection Psot; path input:/api/user/loginClick Parameters, click the Add button, name Input: Username value input: xxx;passwd value input: XXX4, click on Thread Group, ri
Interface 3: Adding student informationBrief description: Practice passing JSON type parametersRequest URL:http://api.nnzhp.cn/api/user/add_stuRequest Method: Post1. Open JMeter, right click on test Plan, select Add-threads-thread Group2, click on Thread Group, right-add sampler-http request3,http Request page, server name or IP field input: api.nnzhp.cn; method select Post; path input:/api/user/add_stuClick Body Data to enter the JSON parameter{"Name
Wind net login, modify the personal information instance, demonstrate the use of the above Webdriver API6th ChapterOverview of the design of the automation architecture design purpose and purpose of specific classes, including:BaselibSeleniumbase LibBusinesslibObjectStore interfaceMethodoutputmessage interfaceInputdatastore interfaceConfig.properties file7th ChapterOutlines how to generate debug-level test
name, generate the corresponding time of the HTML visual report, the report content contains the test time, the total number of test execution cases, the success of the execution, failure, the number of error cases statistics, as well as the execution of a single use case (ID, use case name, (custom) interface name, Interface URL, interface parameters, run results, etc.)9, according to the actual situation
Https://github.com/HttpRunner/HttpRunnerManagerHttprunnermanagerdesign PhilosophyHttprunner-based interface Automation test Platform: HttpRunner , djcelery and Django _. Httprunner Manual: http://cn.httprunner.org/Key Features
Project management: Add projects, list presentations, and related operations to support use case bulk uploads (standardized Httprunner JSON and YAML use case scripts)
Mod
outputP.startinfo.createnowindow = true;//does not display the program windowP.start ();//Startup programSend input information to the CMD windowP.standardinput.writeline (@ "taskkill/f/t/im node.exe" + "exit");P.standardinput.autoflush = true;p.EnableRaisingEvents = true;P.close ();}V. SummaryAfter combing the above, in the operation of the environment, need to use a lot of Windows commands. If you want to implement a complete Windows platform Automation
Download plugin:
Python:https://wiki.jenkins-ci.org/display/jenkins/python+pluginRobotframework:https://wiki.jenkins-ci.org/display/jenkins/robot+framework+pluginSelenium:https://wiki.jenkins-ci.org/display/jenkins/selenium+plugin
Plugin use:
Place the downloaded. hpi file in this directory:D:\apache-tomcat-7.0.67\webapps\jenkins\WEB-INF\plugins (Tomcat installation directory)
Whether the plugin was installed successfully
Available via: jenkins-System Management-
: Public Staticdictionarystring,Object> Convertdictionary (stringstr) {JavaScriptSerializer JSS=NewJavaScriptSerializer (); //string jsstr = convertjsonstring (str); Try { returnJss. deserializestring,Object>>(str); } Catch(Exception ex) {Throw NewException (ex. Message); } }Dictionary type Access API interface: basically similar to string type access interface, but need to add dictionary related things, access method is postdict
/1hqggrvaThis is the Android Framework Source Code, which is downloaded and decompressed to copy or move the entire folder to .../android-sdk-windows/sources folder , and then reopen SDK Manager. exe. For the sake of insurance, in case of later use and not installed, so here all installed.Click "AVD Manager.exe" below to create the android emulator. Click "Create .... " "If the display resolution is lower, try to choose a low-resolution "Device".Click "OK" in the AVD Manager window and click "St
packageorg.phoenix.cases;importjava.util.linkedlist;import org.phoenix.action.webelementactionproxy;importorg.phoenix.enums.locatortype;import Org.phoenix.model.caselogbean;importorg.phoenix.model.unitlogbean;/***div form of pop-up box processing, such as login * @author mengfeiyang**/publicclassTestPhoenixCaseDivextends webelementactionproxy{@Overridepublic linkedlist Phoenixframe Automation test Platform
below, not the one above. Looking at the hierarchical structure of the uiautomatorviewer control, we find that the two TextView are forked from the linearlayout, so we should start with this path by specifying the array subscript we need to " Under LinearLayout the second framelayout below the listview below the TextView of index 0:Webelement Target3 = Driver.findelementbyxpath ("//android.widget.linearlayout[1]/android.widget.framelayout/ Android.widget.listview/android.widget.textview[contain
Problem to solve: Appium run times error Failure on androidV7.0 system [install_failed_already_exists:attempt to re-install Io.appium.settings Without first uninstalling.]Cause Analysis: The uiautomator version of Appium is not suitable for androidV7.0.Pre-set conditions: Mobile phone end has been installed Appium Settings and unlock two applicationsResolution steps: 1. Modify the source file-note two lines of code to install Appiumsettings and unlockFile path: C:\Program files (x86) \appium\nod
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.