原创 appium的XPATH獲取text值的方式與selenium區別

這裏爲什麼是@text呢,因爲這裏text是一個屬性,所以有@text="" 就好像XPATH //*[@class="ssdks"] 方式 selenium可能會是 [text()="顯示"]

原创 jenkins運行web項目報錯TestResult' object has no attribute 'outputBuffer

一、運行main函數,未生成測試報告,報錯:'_TestResult' object has no attribute 'outputBuffer'  self.outputBuffer = io.StringIO() self.tes

原创 selenium.下拉框操作(select_by)

練習的html代碼 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>下拉框練習</title> </head> <body> <

原创 處理appium獲取toast內容

1、環境配置 需要確保appium版本在1.6.3及以上 2、需要添加代碼 3、toast的內容 4、編碼 # # 定位toast toast = (By.XPATH, "//*[contains(@text,

原创 Pytest的setup和teardown

pytest實際上是python自帶測試框架unittest的擴展,那麼pytest是如何實現unittest中的setup和teardown的呢? pytest初始化的類別和作用域 模塊級別(Module level setup/tea

原创 selenium is not clickable at point (122, 347). Other element would receive the click

執行selenium 發現報錯is not clickable at point (122, 347). Other element would receive the click 大致意思就是當前元素頁面存在,但是他被其他的對象遮住了,

原创 pip無法安裝:換成國內鏡像

 pip無法安裝:換成國內鏡像即可  pip install openpyxl -i https://pypi.tuna.tsinghua.edu.cn/simple/

原创 pytest使用allure生成測試報告

一、安裝 allure-pytest安裝 : 安裝 allure-pytest 第三方庫,命令>>            pip install allure-pytest   安裝allure: allure官網文檔:      官網

原创 python安裝mysqlclient[MySQLdb]

安裝mysqlclient 要想使 python 可以操作 mysql 就需要 MySQLdb 驅動,它是 python 操作 mysql 必不可少的模塊。 使用pip安裝 pip install mysqlclient   測試 測試

原创 pytest當中fixture的使用

示例一: 運行結果: 示例二: 示例三: 示例四:params 使用 示例五:autouse

原创 python的pytest框架

1、介紹 pytest是一個非常成熟的全功能的Python測試框架,主要有以下幾個特點: 簡單靈活,容易上手 支持參數化 能夠支持簡單的單元測試和複雜的功能測試,還可以用來做selenium/appnium等自動化測試、接口自動化測試(p

原创 使用tomcat部署jenkins的WAR包出現的插件問題

到http://mirrors.jenkins-ci.org/plugins 去下載對應插件 然後到管理-插件-高級-上傳即可  

原创 Windows Server R2 安裝python時報策略不允許的解決方案

有效的方式是去改註冊表,在這個HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows項下面找到Installer,如果你的下面沒有則創建一個,然後新建名爲DisableMSI值爲0

原创 pytest使用SKIP跳過用例

來自網絡視頻截圖

原创 Grafana監控服務器安裝

一、在centos7上下載並安裝Grafana 1.基本操作,關閉centos防火牆 systemctl stop firewalld systemctl disable firewalld 以下的這個我沒有操作 setenforce