s = requests.session ()# This method only applies to websites that are cookies, and the website is token useless# The advantage of this is that you can save cookies and keep conversations, without having to get,Token Request:Cookies Request:There are cookies that remain logged in:Update the cookies with S to log in cookiess = requests.session ()# Plus Cookiesc = Requests.cookies.RequestesCookieJar ()C.set (' Cookies ', ' value ',)C.set (' Cookies ', ' value ')#更新s上的cookiesS.cookies.update (c) #
# Pass JSON parametersRequests= ' xxxxxxxx '= {' xxx ': ' xxx ',' xxx ': ' xxx '}# body is in JSON formatRequests.post(URL, json=body)Print(r.text)# The second methodJsonRequests.post(url, data=json.dumps(body))Print(r.text)Import RequestsURL = "Http://v.juhe.cn/weather/index"= {" cityname": " Shenzhen ", # City name or city ID, such as:" Suzhou ", Need UTF8 UrlEncode"Dtype": "JSON", # Return Data format: JSON or XML, default JSON"format": "1", # Next 7 Days Forecast (future) Two return formats,
Python is a 3.5,chrome browser version in early 17.1.chromedriverDownload a chromedriver in http://chromedriver.storage.googleapis.com/index.html?path=2.30/, unzip the exe paste into the chrome installation path, Generally in program Files (x86) \google\chrome\application2. Installing the Selenium LibraryOpen the console and enter the command: Pip install SeleniumIf PIP is not installed, then search keywords: python pip installation3. A little DemoCan be under each Pycharm community version to u
corresponds to the method of the HTTP request. is commonly used for get and post requests. A GET request is typically a query for resource information. Post is typically updated with resource information. 1.1 Viewing the use of Get functions >>> Help (requests.get) #查看requests库的属性get请求函数的使用 NBsp Help on function get in module requests.api:get (URL, Params=none, **kwargs) sends a get request.:p aram ur L:url for the New:class: ' Request ' object.:p Aram params: (optional) Dictionary or bytes
Interface 3: Adding student informationBrief description: Add student information, enter parameter is JSON typeRequest Url:http://api.nnzhp.cn/api/user/add_stuRequest mode: Post, parameter is JSON type
Name of parameter
Must-Choose
Type
Description
Name
Y
String
Student Name
Grade
Y
String
Class
Phone
Y
Int
Phone
Sex
N
String
Sex, do not pass the
UI Automation Testing with Sikuli is a lot easier, without using AppleScript's annoying syntax, as long as the UI of the interface doesn't change, the change in structure doesn't affect Sikuli-based automation, but AppleScript-based will be affected.and using image recognition for automation is much closer to real manual testing than using scripting
App Automation Framework selection
The current comparison of the Fire Automation tool features: Appium (for androidios; support multi-lingual, no application source code) Uiautomator (for Android; Java-only language; no application source required) Robotium (for Android; Java only; no application source) Calabash (for Androidios;ruby languages (other languages are unfriendly); you need to apply the source
Automation testing is the trend of the times, so many testers began to study automated testing, Web Automation testing test is not difficult, but many people are blocked in the environment to build this step, behind the study of passion, here, Tao Brother teach you to build a Firefox browser under the automated test en
phone automation testing, which strong?One , robotium Android testing toolRobotium is a free Android test tool that provides a class library for testers to call, it only supports the Java language, so it basically uses the Exclipse tool to develop the code.Written scripts can be tested in support of different versions of Android. Because the Robotim test tool is
ObjectiveWe tried several methods before testing the Web service, such as using SOAPUI, programming with local proxy classes, and so on. The former is not easy to automate, the latter is tested from the SOAP protocol level, the data organization is not very convenient, the test program is relatively complex, and the extensibility is not good.Most of the SOAP protocol uses HTTP binding, and we find that using HTTP to send packets directly to the Web se
In the process of Web UI automation testing, it is common to test the display of the page at different resolutions, that is, after a full screen browser on a different size display, the test method needs to buy a different size of the display, or frequently set the screen resolution, not only wasted a lot of money, At the same time also need someone on duty, so t
Chapter:--monkeyrunner Principle of automation basic articleNetEase Cloud Classroom:http://study.163.com/course/courseLearn.htm?courseId=712011#/learn/video?lessonId=877115courseId=712011Main content and notes:I. Theoretical knowledge and script presentationThe best way is the last officer Web document to see the introduction of Monkeyrunner, official online not to go to find a local Android 4.2 view, the basic content has not changedFirst, what is Mo
: Gem uninstall watir-v 5.0.0Enter the command: gem install watir-v 3.0.0Figure 1-12 Commonwatir downgrade to 3.0.0Enter the command: Gem Uninstall commonwatir-v 4.0.0Enter the command: gem install commonwatir-v 3.0.0Figure 1-13 Ruby test Coderequire "watir" puts "Open IE ... "IE =watir::ie.New ie. Goto(http://www.baidu.com/)puts " IE is Opened-enjoy it:) "Create a new test.rb file in the text editor, enter the above code, it is strongly recommended
Occurrence background:Recently began to tidy up the Selenium+python Automation test project related issues, occasionally turn up their own learning automation when writing scripts, found that I have been quick to recognize what ghost Journal, so today special finishing under the automation of development selenium+ A ba
I. Introduction of SeleniumSelenium is a Web Automation application testing tool that also supports the automation of all Web management tasks. and open source is free and a lightweight framework for Web automation. It supports multiple browsers, cross-platform, cross-operating systems, supports scripting in multiple programming languages, and enables the executi
Interface testing is a common task in testing, but in the past the interface test work is generally used in third-party plug-ins, Python-developed Send request scripts, LR scripts, jmeter scripts, before also using Python developed a set of interface Automation test system, But that was also because of the work of the need to sort out, may be more suitable for th
, accessibility ID,-android uiautomatoreight. UI AutomatorUI Automation test framework, Android mobile apprequirements: Android 4.3 or above
Provides a series of APIs: Perform UI tests on a system or third-party app
Allows operation on the device under test, such as opening the System settings menu
Suitable for writing black box
Many of the rice technology projects have used the crawler to collect Web data, breakthroughs in the anti-reptile, automated testing, regression testing also requires the meter to consider building automation, to improve the entire team's ultimate efficiency.
Due to busy requirements and product process specifications, there is now a lot of research on testing technology. But whatever you do, it's important to do it.
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.