原创 postman學習-http請求
Http請求是服務器和客戶端之間交換數據的方式。 有兩種類型的消息: 請求--由客戶端發送用來觸發一個服務器上的動作 響應--來自服務器的應答 請求的構成:起始行,Headers,Body
原创 postman--斷言
接口文檔:https://www.v2ex.com/p/7v9TEc53 url:https://www.v2ex.com/api/topics/hot.json 代碼: tests["狀態碼必須是200"] = responseCode
原创 appium之啓動app
先貼代碼: # coding:utf-8 import os from appium import webdriver apk_path = os.path.abspath(os.path.join(os.path.dirname(_
原创 selenium自動化-#iframe切換
#登錄163郵箱 代碼 #coding:utf-8 from selenium import webdriver import random import time from selenium.webdriver.common.keys
原创 selenium-日曆輸入框(修改readonly屬性)
# coding:utf-8 from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from se
原创 selenium自動化-同一個窗口打開網頁,只適用於有這個target="_blank"屬性鏈接情況
# coding:utf-8 from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from se
原创 selenium自動化-多窗口handle處理
# coding:utf-8 from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from se
原创 selenium自動化-js處理內嵌div滾動條
頁面源碼如下:(copy下來,用文本保存下來,後綴改成.html,用瀏覽器打開) <!DOCTYPE html> <meta charset="UTF-8"> <!-- for HTML5 --> <meta http-equiv="Co
原创 selenium自動化-多窗口、句柄(handle)
#coding:utf-8 from selenium import webdriver import random import time from selenium.webdriver.common.keys import Keys
原创 購物車練習
題目:1.啓動程序後,讓用戶輸入工資,然後打印商品列表2.允許用戶根據商品編號購買商品3.用戶選擇商品後,檢測餘額是否夠,夠就直接扣款,不夠就提醒4.可隨時退出,退出時,打印已購買的商品和餘額代碼:#!/u
原创 selenium自動化-select下拉框
方法一:二次定位 #coding:utf-8 from selenium import webdriver import random import time from selenium.webdriver.common.keys im
原创 python學習--文件操作
高效讀文件:f = open("ys",'r',encoding='utf-8') count =0 for line in f: if count == 9: print("------woshi---")
原创 函數學習:局部變量
#coding:utf-8 school="oldboy" #全局變量 def change_name(name): global school# 在函數中定義全局變量 school="Mage linux"
原创 selenium自動化-獲取元素的屬性
# coding:utf-8 from selenium import webdriver import time driver = webdriver.Chrome() driver.implicitly_wait(10) drive
原创 列表的學習--深淺copy,切片,循環列表
#!/usr/bin/python import copy #filename:test2018.py names = ["4Zhangyang","#!Guyun","xXiangPeng", ["alex","jack"],"C