原创 python識別二維碼內容
from pyzbar.pyzbar import decode from PIL import Image image = 'xx.png' img = Image.open(image) barcodes = decode(img)
原创 Python之OS模塊常用函數
import os print(dir(os)) # 查看os下的函數 print(dir(os.path)) # 查看os.path下的函數 print(os.name) # 顯示當前使用的平臺,'nt'表示Windows,
原创 selenium的8種元素定位-方式
1、id定位: find_element_by_id() 從上面定位到的搜索框屬性中,有個id="kw"的屬性,我們可以通過這個id定位到這個搜索框 代碼: # coding = utf-8 from time import slee
原创 pytest添加附件到allure報告上
import allure import pytest def test_allure_print(): print("測試print在allure報告上") print("測試截圖附件在allure報告上")
原创 HomeBrew安裝或卸載
安裝: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 卸載: /usr
原创 linux的tar解壓縮命令常用參數
解壓 tar -xvf file.tar //解壓 tar包 tar -xzvf file.tar.gz //解壓tar.gz tar -xjvf file.tar.bz2 //解壓 tar.bz2 tar -xZvf file.ta
原创 mysql5.7版本數據庫配置文件my.ini路徑
網上看教程大家都說有my.ini配置文件,搜了好久才發現在這個路徑下 C:\ProgramData\MySQL\MySQL Server 5.7
原创 iOS+appium自動化測試環境搭建
備註: wendriveragent作爲appium和ios設備的中間通信的橋樑,安裝實現有很多細節問題,會踩一些坑 安裝環境目錄(親測可以運行成功): 1.xcode安裝(建議mac系統在10.12以上,xcode在8.1以上,避免
原创 iOS appium操作元素常用方法
1.ios_predicate(推薦,用的多) 在 iOS 的 UI 自動化中,使用原生支持的Predicate定位方式是最好,可支持元素的單個屬性和多個屬性定位,強烈推薦使用 driver.find_element_by_ios_pre
原创 iOS混合頁面應用+webdriveragent實操
轉載自:https://www.jianshu.com/p/a9aaf03c39cc 5、更新Appium中的WebDriverAgent 1)下載webdriveragent https://github.com/appium/
原创 python取json數據的路徑和json返回值拆成兩個參數拼接
url = base_url + "/ops/machineManage/query" data = {"currentPage": 1, "pageSize": 20, "page": 1} r = requests.post(url
原创 開發者賬號和TeamId如何查看
security find-identity -v -p codesigning
原创 linux性能監控常用命令
內存性能指標top top 看us和sy us 用戶進程對cpu的使用率 sy 系統進程對cpu的使用率 %us:表示用戶空間程序的 cpu 使用率(沒有通過 nice 調度) %sy:表示系統空間的 cpu 使用率,主要是內核程序。
原创 python使用jsonpath操作json數據
使用jsonpath模塊,需要 pip install jsonpath 安裝即可。 當遇到層級比較深的字典時,要想取值使用jsonpath取值比較方便,可以一下取到。 如果取得值不存在,則返回False, import jsonp
原创 linux下安裝java配置環境變量
1.下載 JDK 進入 Oracle 官方網站 下載合適的 JDK 版本,準備安裝。 注意:這裏需要下載 Linux 版本。這裏以jdk-8u151-linux-x64.tar.gz爲例,你下載的文件可能不是這個版本,這沒關係,只要後綴(