成人国产在线小视频_日韩寡妇人妻调教在线播放_色成人www永久在线观看_2018国产精品久久_亚洲欧美高清在线30p_亚洲少妇综合一区_黄色在线播放国产_亚洲另类技巧小说校园_国产主播xx日韩_a级毛片在线免费

資訊專欄INFORMATION COLUMN

Web 自動(dòng)化測試框架 sweetest 介紹

lijy91 / 2508人閱讀

摘要:介紹是一款自動(dòng)化測試框架,或者說是解決方案,名字取含義。打開操作,一般要在測試數(shù)據(jù)中指定新窗口名稱,如新窗口百度搜索窗口。測試數(shù)據(jù)列為要輸入的內(nèi)容。

介紹

sweetest 是一款 Web 自動(dòng)化測試框架,或者說是解決方案,名字取 Selenium, Web UI, Excel, Element, Test 含義。
特點(diǎn):

簡單快速,輕松上手

無需編碼能力

在 Excel 中以文本編寫測試用例

維護(hù)成本低

支持千、萬級(jí)別的用例規(guī)模

擁抱變化,支持敏捷

背景

目前,Web 自動(dòng)化測試基本上是以 Selenium 為接口來編寫測試代碼,但效果往往不是很好,普遍遇到如下問題:

用例設(shè)計(jì)人員的編碼能力很弱,測試代碼編寫和維護(hù)成本高,效果差;

測試代碼量大,測試意圖不直觀,無法支撐千、萬級(jí)別的用例規(guī)模;

Web 頁面元素的定位非常繁瑣,且頁面結(jié)構(gòu)經(jīng)常變動(dòng),導(dǎo)致用例失效。

我們知道,傳統(tǒng)的測試用例一般是在 Excel 中用文本編寫的,如果自動(dòng)化測試用例也這么寫,是不是就可以解決問題1和2?
對(duì)于問題3,我想是時(shí)候?qū)﹂_發(fā)提出一些要求了,同時(shí)我們的元素定位也要優(yōu)化,讓頁面自由的去變化,而我們的定位只做最小適用。

實(shí)現(xiàn)思路

Selenium 為底層接口;

在 Excel 中用文本編寫測試用例;

元素定位表格化,且優(yōu)先使用“板塊通用定位法”;

要求開發(fā)提供必要的、統(tǒng)一的元素屬性;

框架負(fù)責(zé)解析測試用例,執(zhí)行用例,記錄日志,輸出測試結(jié)果。

方案

開發(fā)語言:Python

底層接口:Selenium

用例工具:Excel

測試用例如下圖:

安裝 環(huán)境要求

系統(tǒng)要求:Windows

Python 版本:3.6+

Selenium

瀏覽器:Chrome

Chrome 驅(qū)動(dòng): chromedriver

安裝 sweetest

pip install sweetest

快速體驗(yàn)

打開 cmd 命令窗口,切換到某個(gè)目錄,如:D:Autotest

sweetest
cd sweetest_sample
python start.py

OK,如果一切順利的話,sweetest 已經(jīng)跑起來了

目錄結(jié)構(gòu)

目錄 說明
element 頁面元素表目錄
Baidu-Elements.xlsx 頁面元素表,名稱格式:project_name + "-Elements.xlsx"
junit junit格式測試結(jié)果目錄
log 自動(dòng)化測試運(yùn)行日志目錄
report Excel 格式測試結(jié)果目錄
snapshot 錯(cuò)誤截圖目錄
testcase 測試用例目錄
Baidu-TestCase.xlsx 測試用例,名稱格式:project_name + "-TestCase.xlsx"
start.py 啟動(dòng)腳本,test = Autotest(project_name, sheet_name)

備注:以上3處的 project_name 必須一致

頁面元素表

頁面元素表的作用主要是把元素定位獨(dú)立出來,一是方便維護(hù)定位信息,二是測試用例中用元素名稱書寫,可讀性更高。

目錄 注釋
page element 所在的頁面,在所有頁面都可用的 element 放在“通用”下面,如 title
frame element 所在的 frame id,如果是頂層 frame,可為空。
name element 名稱,在不同的 page 下面可以同名
by Selenium 定義方式
value Selenium 定義的值
備注 注釋作用
元素定位

id, link_text, partial_link_text, xpath, class_name

如:

page name by value
百度搜索頁面 搜索框 id kw

則自動(dòng)化運(yùn)行時(shí)會(huì)以 find_element_by_id("kw") 來定位

帶變量的定位方式

如示例中:

page name by value
百度搜索頁面 搜索結(jié)果# xpath //*[@id="#"]/h3/a

寫用例時(shí),需要在 搜索結(jié)果# 后面帶上變量,如: 搜索結(jié)果#1

操作 頁面 元素
點(diǎn)擊 百度搜索頁面 搜索結(jié)果#1

則自動(dòng)化運(yùn)行時(shí)會(huì)以 find_element_by_xpath("http://*[@id="1"]/h3/a") 來定位

已定義好的常用變量定位方式:

id#

link#

*link#

xpath#

class#

name#

url#

如:url#www.baidu.com

當(dāng)然,如果#后面的變量不夠直觀的話,不建議太多使用這幾個(gè)變量方式。

頁面標(biāo)題

頁面的 title

頁面URL

頁面的 url

一般來講,導(dǎo)航欄在所有頁面都存在,應(yīng)該把導(dǎo)航欄放在“通用”下面,做成變量定位方式,如示例中的:

page name by value
通用 搜索頁導(dǎo)航欄# xpath //*[@class="s_tab"]//a[text()="#"]

用例中的寫法:

操作 頁面 元素
點(diǎn)擊 通用 搜索頁導(dǎo)航欄#新聞

測試用例

下拉菜單配置

操作、頁面、元素這些列其實(shí)都是選項(xiàng)列表,利用 Excel 的下拉菜單功能,能夠讓書寫用例更方便,且不易筆誤。
下圖是測試用例文件中的 ElementsMap 頁面:

我們可以通過 Excel 的菜單欄“公式-名稱管理器”來配置這些菜單,同時(shí)在用例頁面通過“數(shù)據(jù)-數(shù)據(jù)有效性”配置好“操作”的下拉菜單,以及“頁面-元素”的二級(jí)聯(lián)動(dòng)下拉菜單。

用例字段

必填字段:

用例編號(hào)

步驟編號(hào)

操作

頁面

元素

前置條件:

BASE: 整個(gè)測試套件的基礎(chǔ),必須通過才會(huì)執(zhí)行下一步,如:登錄;如果有的話應(yīng)該為第一個(gè)測試用例。

SETUP:每個(gè)測試用例執(zhí)行前需要執(zhí)行的用例,只有 SETUP 執(zhí)行成功才會(huì)執(zhí)行該用例,如:返回首頁。

MAIN:一組用例的第一用例,和 SUB 一起使用,一個(gè) MAIN 后面可以帶多個(gè)連續(xù)的 SUB 用例。此用例需要先執(zhí)行 SETUP 用例。

SUB:和 MAIN 一起使用,當(dāng)前一個(gè)用例(MAIN or SUB)執(zhí)行結(jié)果為通過時(shí)才會(huì)執(zhí)行,否則測試結(jié)果置為 Blocked;且執(zhí)行此用例前不會(huì)執(zhí)行 SETUP 用例。

SNIPPET:用例片段,運(yùn)行到此用例時(shí)不會(huì)立即執(zhí)行,需要在其他用例中使用“執(zhí)行”關(guān)鍵字調(diào)用此“用例片段”,才會(huì)執(zhí)行;配合“執(zhí)行”關(guān)鍵字的變量賦值功能,可以實(shí)現(xiàn)用例復(fù)用。

注意事項(xiàng):

一般必須有 SETUP 用例。當(dāng)執(zhí)行 SETUP 失敗,會(huì)嘗試執(zhí)行一次 BASE->SETUP 作為 SETUP 的執(zhí)行結(jié)果。

BASE 用例可以有 0 到多個(gè),但作為 SETUP 中 BASE->SETUP 的 BASE 只有最后一個(gè) BASE 用例。

SETUP 用例只能有 1 條,如果寫了多條,只有最后一條起作用。

操作(關(guān)鍵字)及對(duì)應(yīng)的測試數(shù)據(jù)

打開

get 方法,打開一個(gè)鏈接。

打開操作,一般要在測試數(shù)據(jù)中指定新窗口名稱,如:新窗口=百度搜索窗口。

檢查

取頁面元素的值、屬性和預(yù)期結(jié)果對(duì)比。

測試數(shù)據(jù)中如果沒有寫“k=v”的方式,則默認(rèn)是取元素的 text。

檢查 text:

操作 頁面 元素 測試數(shù)據(jù)
檢查 百度搜索頁面 搜索按鈕 百度一下

等價(jià)于

操作 頁面 元素 測試數(shù)據(jù)
檢查 百度搜索頁面 搜索按鈕 text=百度一下

檢查屬性:

操作 頁面 元素 測試數(shù)據(jù)
檢查 百度搜索頁面 搜索框 name=wd

“頁面標(biāo)題”和“頁面URL”直接在測試數(shù)據(jù)中寫預(yù)期結(jié)果即可。

操作 頁面 元素 測試數(shù)據(jù)
檢查 百度搜索頁面 頁面標(biāo)題 百度一下,你就知道

注意:測試數(shù)據(jù)中,由于逗號(hào)(,or ,)是多個(gè)“k=v”的分隔符,所以如果 v 中有逗號(hào),要用反斜杠()轉(zhuǎn)義;但等號(hào)(=)無需轉(zhuǎn)義。

輸入

在輸入框中輸入文本。

測試數(shù)據(jù)列為要輸入的內(nèi)容。

點(diǎn)擊

點(diǎn)擊按鈕或者鏈接等(一切可點(diǎn)擊操作的)元素。此關(guān)鍵字支持在同一個(gè)頁面上順序點(diǎn)擊多個(gè)元素,在元素列以豎杠(|)分割即可,如:

操作 頁面 元素
點(diǎn)擊 百度搜索頁面 搜索按鈕|搜索結(jié)果#1

移動(dòng)到

有些頁面元素,當(dāng)鼠標(biāo)移動(dòng)到上面時(shí),會(huì)彈出下拉菜單等。此操作同關(guān)鍵字“點(diǎn)擊”類似。

執(zhí)行

即執(zhí)行測試用例片段,支持在測試數(shù)據(jù)中給變量賦值,如我們有用例片段 SNIPPET_001,則測試用例 BAIDU_002 中,步驟1如下:

操作 頁面 元素 測試數(shù)據(jù)
執(zhí)行 用例片段 SNIPPET_001 keywords=搜狗

把變量 keyswords 賦值為“搜狗”,此步驟會(huì)執(zhí)行用例片段 SNIPPET_001,其搜索的關(guān)鍵字為“搜狗”。

檢查

把檢查結(jié)果反向,此關(guān)鍵字暫時(shí)未完整實(shí)現(xiàn)。

測試數(shù)據(jù):

測試數(shù)據(jù)支持模糊匹配,如下:

操作 頁面 元素 測試數(shù)據(jù)
檢查 通用 頁面標(biāo)題 *知乎

則,頁面標(biāo)題中含有“知乎”即為通過。注意星號(hào)(*)要寫在開頭。

輸出數(shù)據(jù):

在運(yùn)行時(shí),把元素的值或?qū)傩再x值給變量,此變量可以在之后的步驟中使用"<>"引用變量名。

操作 頁面 元素 測試數(shù)據(jù) 輸出數(shù)據(jù)
點(diǎn)擊 百度搜索頁面 搜索結(jié)果#1 title=text
檢查 通用 頁面標(biāo)題 </td> </tr> </tbody> </table> <b>步驟編號(hào):</b> <p>除了控制語句符號(hào)外,步驟編號(hào)必須為數(shù)字,建議在 Excel 中設(shè)置為文本格式。</p> <p>控制語句:</p> <p> <p>if then else</p> <table> <thead><tr> <th>步驟編號(hào)</th> <th>操作</th> <th>頁面</th> <th>元素</th> <th>測試數(shù)據(jù)</th> </tr></thead> <tbody> <tr> <td>^3</td> <td>檢查</td> <td>通用</td> <td>頁面標(biāo)題</td> <td>*知乎</td> </tr> <tr> <td>>4</td> <td>點(diǎn)擊</td> <td>通用</td> <td colspan="2">link#登錄</td> </tr> <tr> <td><5</td> <td>點(diǎn)擊</td> <td>通用</td> <td colspan="2">link#注冊(cè)機(jī)構(gòu)號(hào)</td> </tr> </tbody> </table> <p>^ 表示 if 語句</p> <p>> 表示 then 語句</p> <p>< 表示 else 語句</p> <p>if(^) 語句為真時(shí),執(zhí)行 then(>) 語句,為否時(shí)執(zhí)行 else(<) 語句。無論后面有沒有 then 或者 else 語句,不影響后續(xù)步驟執(zhí)行。</p> <p>then 語句 或者 else 語句,當(dāng)不被執(zhí)行時(shí),測試結(jié)果為 "-",不影響測試用例結(jié)果和后續(xù)步驟執(zhí)行。當(dāng)執(zhí)行時(shí),和正常步驟一樣,成功則繼續(xù),失敗則該用例失敗。</p> </p> <b>進(jìn)階</b> <b>元素管理</b> <p>測試用例中元素是以 page + name 為唯一標(biāo)識(shí),來頁面元素表中查找定位信息的。因此,不同 page 下的元素 name 可以相同,但不能和“通用”下的相同。</p> <p>測試用例中,如果 page 不為“通用”,當(dāng) <page> + name 查找不到,會(huì)繼續(xù)以 “通用” + name 為標(biāo)識(shí)符來查找。</p> <p>“通用”是方便我們寫頁面元素表的,寫用例時(shí)我們建議還是用 <page> 來代替“通用”,甚至有時(shí)候我們必須這么做。</p> <b>窗口管理(頁面,frame)</b> <p>在瀏覽器中,有可能會(huì)打開多個(gè)標(biāo)簽頁,我們叫它為窗口。當(dāng)你新打開一個(gè)標(biāo)簽頁時(shí),你可以在測試數(shù)據(jù)中給它起個(gè)名字,格式為:新窗口=<window_name>, 如:</p> <table> <thead><tr> <th>操作</th> <th>頁面</th> <th>元素</th> <th>測試數(shù)據(jù)</th> </tr></thead> <tbody> <tr> <td>打開</td> <td>通用</td> <td>百度搜索鏈接</td> <td>新窗口=百度搜索窗口</td> </tr> <tr> <td>檢查</td> <td>百度搜索頁面</td> <td>頁面標(biāo)題</td> <td>百度一下,你就知道</td> </tr> </tbody> </table> <p>當(dāng)你給新的標(biāo)簽頁起了窗口名字,它之后步驟的頁面("通用"除外)就會(huì)綁定到這個(gè)窗口。如上面第 2 步,“百度搜索頁面”會(huì)綁定到“百度搜索窗口”。那么之后的步驟或用例中,即使打開了多個(gè)標(biāo)簽頁,只要頁面是“百度搜索頁面”,就會(huì)切換到“百度搜索窗口”這個(gè)標(biāo)簽頁上操作。</p> <p>注意:“通用”是不綁定到任何窗口的,也不做窗口切換,它直接在“當(dāng)前窗口”操作。</p> <p>“當(dāng)前窗口”規(guī)則為:</p> <p>執(zhí)行到某個(gè)步驟時(shí),“當(dāng)前窗口”是瀏覽器焦點(diǎn)所在的窗口,也就是上個(gè)步驟執(zhí)行操作的窗口。</p> <p>如果此步驟的頁面已綁定到其他窗口,則“當(dāng)前窗口”會(huì)切換過去。</p> <p>如果此步驟的頁面尚未捆定任何窗口,則會(huì)捆定到“當(dāng)前窗口”。</p> <p>上個(gè)步驟如果是新打開的窗口,則“當(dāng)前窗口”是新打開的窗口。</p> <p>注意:</p> <p>如果打開了 2 個(gè)或以上窗口,沒有起名字的窗口,在執(zhí)行到切換窗口的步驟時(shí),會(huì)自動(dòng)被關(guān)掉。</p> <p>起了名字的窗口不會(huì)被關(guān)掉。</p> <p>但如果起了同樣的名字,則原先的那個(gè)窗口會(huì)被關(guān)掉,綁定在其上面的頁面也會(huì)被注銷。</p> <b>測試執(zhí)行</b> <p><b>python start.py</b></p> <b>測試報(bào)告</b> <p>見 report 目錄</p> <pre> <p>QQ交流群:158755338 (驗(yàn)證碼:python)</p> <p>項(xiàng)目地址:https://github.com/tonglei100...</p> </pre> </div> <div id="qoyqs8suu2u" class="mt-64 tags-seach" > <div id="qoyqs8suu2u" class="tags-info"> <a style="width:120px;" title="GPU云服務(wù)器" href="http://systransis.cn/site/product/gpu.html">GPU云服務(wù)器</a> <a style="width:120px;" title="云服務(wù)器" href="http://systransis.cn/site/active/kuaijiesale.html?ytag=seo">云服務(wù)器</a> <a style="width:120px;" title="python自動(dòng)化測試框架" href="http://systransis.cn/yun/tag/pythonzidonghuaceshikuangjia/">python自動(dòng)化測試框架</a> <a style="width:120px;" title="android自動(dòng)化測試框架" href="http://systransis.cn/yun/tag/androidzidonghuaceshikuangjia/">android自動(dòng)化測試框架</a> <a style="width:120px;" title="web前端自動(dòng)化測試" href="http://systransis.cn/yun/tag/webqianduanzidonghuaceshi/">web前端自動(dòng)化測試</a> <a style="width:120px;" title="web 自動(dòng)化測試工具" href="http://systransis.cn/yun/tag/web zidonghuaceshigongju/">web 自動(dòng)化測試工具</a> </div> </div> <div id="qoyqs8suu2u" class="entry-copyright mb-30"> <p class="mb-15"> 文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。</p> <p>轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/40944.html</p> </div> <ul class="pre-next-page"> <li id="qoyqs8suu2u" class="ellipsis"><a class="hpf" href="http://systransis.cn/yun/40943.html">上一篇:python判斷變量類型時(shí),判斷一個(gè)變量的類型時(shí)為什么不使用type(),而是用isinstance</a></li> <li id="qoyqs8suu2u" class="ellipsis"><a class="hpf" href="http://systransis.cn/yun/40945.html">下一篇:django rest framework個(gè)人學(xué)習(xí)筆記(六)————Tutorial4.認(rèn)證于授權(quán)</a></li> </ul> </div> <div id="qoyqs8suu2u" class="about_topicone-mid"> <h3 class="top-com-title mb-0"><span data-id="0">相關(guān)文章</span></h3> <ul class="com_white-left-mid atricle-list-box"> <li> <div id="qoyqs8suu2u" class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="http://systransis.cn/yun/70409.html"><b>[直播視頻] 《Java 微服務(wù)實(shí)踐 - Spring Boot 系列》限時(shí)折扣</b></a></h2> <p class="ellipsis2 good">摘要:作為微服務(wù)的基礎(chǔ)設(shè)施之一,背靠強(qiáng)大的生態(tài)社區(qū),支撐技術(shù)體系。微服務(wù)實(shí)踐為系列講座,專題直播節(jié),時(shí)長高達(dá)小時(shí),包括目前最流行技術(shù),深入源碼分析,授人以漁的方式,幫助初學(xué)者深入淺出地掌握,為高階從業(yè)人員拋磚引玉。 簡介 目前業(yè)界最流行的微服務(wù)架構(gòu)正在或者已被各種規(guī)模的互聯(lián)網(wǎng)公司廣泛接受和認(rèn)可,業(yè)已成為互聯(lián)網(wǎng)開發(fā)人員必備技術(shù)。無論是互聯(lián)網(wǎng)、云計(jì)算還是大數(shù)據(jù),Java平臺(tái)已成為全棧的生態(tài)體系,...</p> <div id="qoyqs8suu2u" class="com_white-left-info"> <div id="qoyqs8suu2u" class="com_white-left-infol"> <a href="http://systransis.cn/yun/u-912.html"><img src="http://systransis.cn/yun/data/avatar/000/00/09/small_000000912.jpg" alt=""><span id="qoyqs8suu2u" class="layui-hide64">Enlightenment</span></a> <time datetime="">2019-08-16 10:45</time> <span><i class="fa fa-commenting"></i>評(píng)論0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> <li> <div id="qoyqs8suu2u" class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="http://systransis.cn/yun/121350.html"><b><em>自<em>動(dòng)化</em></em><em>測試</em>系列(三)|UI<em>測試</em></b></a></h2> <p class="ellipsis2 good">摘要:在上次的自動(dòng)化測試系列二自動(dòng)化測試系列二中為大家大體介紹了測試的概念及在豬齒魚中的實(shí)踐展開,本文主要圍繞測試進(jìn)行概念介紹及中的實(shí)踐展開。手動(dòng)測試要求測試人員在每個(gè)元素上手動(dòng)執(zhí)行每個(gè)測試。主要是用于回歸測試和同一軟件的新版本測試。 UI 測試是一種測試類型,也稱為用戶界面測試,通過該測試,我們...</p> <div id="qoyqs8suu2u" class="com_white-left-info"> <div id="qoyqs8suu2u" class="com_white-left-infol"> <a href="http://systransis.cn/yun/u-109.html"><img src="http://systransis.cn/yun/data/avatar/000/00/01/small_000000109.jpg" alt=""><span id="qoyqs8suu2u" class="layui-hide64">pingan8787</span></a> <time datetime="">2021-09-28 09:35</time> <span><i class="fa fa-commenting"></i>評(píng)論0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> <li> <div id="qoyqs8suu2u" class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="http://systransis.cn/yun/87412.html"><b>前端每周清單半年盤點(diǎn)之 JavaScript 篇</b></a></h2> <p class="ellipsis2 good">摘要:前端每周清單專注前端領(lǐng)域內(nèi)容,以對(duì)外文資料的搜集為主,幫助開發(fā)者了解一周前端熱點(diǎn)分為新聞熱點(diǎn)開發(fā)教程工程實(shí)踐深度閱讀開源項(xiàng)目巔峰人生等欄目。背后的故事本文是對(duì)于年之間世界發(fā)生的大事件的詳細(xì)介紹,闡述了從提出到角力到流產(chǎn)的前世今生。 前端每周清單專注前端領(lǐng)域內(nèi)容,以對(duì)外文資料的搜集為主,幫助開發(fā)者了解一周前端熱點(diǎn);分為新聞熱點(diǎn)、開發(fā)教程、工程實(shí)踐、深度閱讀、開源項(xiàng)目、巔峰人生等欄目。歡迎...</p> <div id="qoyqs8suu2u" class="com_white-left-info"> <div id="qoyqs8suu2u" class="com_white-left-infol"> <a href="http://systransis.cn/yun/u-1530.html"><img src="http://systransis.cn/yun/data/avatar/000/00/15/small_000001530.jpg" alt=""><span id="qoyqs8suu2u" class="layui-hide64">Vixb</span></a> <time datetime="">2019-08-21 12:04</time> <span><i class="fa fa-commenting"></i>評(píng)論0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> <li> <div id="qoyqs8suu2u" class="atricle-list-right"> <h2 class="ellipsis2"><a class="hpf" href="http://systransis.cn/yun/8812.html"><b>有贊 <em>WEB</em>-UI <em>自<em>動(dòng)化</em></em>實(shí)踐</b></a></h2> <p class="ellipsis2 good">摘要:概述是由有贊開發(fā)的自動(dòng)化工具,并以此實(shí)現(xiàn)了端和端的核心業(yè)務(wù)的自動(dòng)化。旨在簡化開源工具提供的接口,方便自動(dòng)化測試用例的設(shè)計(jì)。元素定位自動(dòng)化用例其實(shí)可以分成兩部分,定位元素調(diào)用接口操作該元素。一臺(tái)用于跑自動(dòng)化用例的服務(wù)器。 概述 Bee 是由有贊 QA 開發(fā)的 UI 自動(dòng)化工具,并以此實(shí)現(xiàn)了 web 端和 wap 端的核心業(yè)務(wù)的自動(dòng)化。旨在簡化開源工具提供的接口,方便 UI 自動(dòng)化測試用例...</p> <div id="qoyqs8suu2u" class="com_white-left-info"> <div id="qoyqs8suu2u" class="com_white-left-infol"> <a href="http://systransis.cn/yun/u-1392.html"><img src="http://systransis.cn/yun/data/avatar/000/00/13/small_000001392.jpg" alt=""><span id="qoyqs8suu2u" class="layui-hide64">h9911</span></a> <time datetime="">2019-05-29 17:04</time> <span><i class="fa fa-commenting"></i>評(píng)論0</span> <span><i class="fa fa-star"></i>收藏0</span> </div> </div> </div> </li> </ul> </div> <div id="qoyqs8suu2u" class="topicone-box-wangeditor"> <h3 class="top-com-title mb-64"><span>發(fā)表評(píng)論</span></h3> <div id="qoyqs8suu2u" class="xcp-publish-main flex_box_zd"> <div id="qoyqs8suu2u" class="unlogin-pinglun-box"> <a href="javascript:login()" class="grad">登陸后可評(píng)論</a> </div> </div> </div> <div id="qoyqs8suu2u" class="site-box-content"> <div id="qoyqs8suu2u" class="site-content-title"> <h3 class="top-com-title mb-64"><span>0條評(píng)論</span></h3> </div> <div id="qoyqs8suu2u" class="pages"></ul></div> </div> </div> <div id="qoyqs8suu2u" class="layui-col-md4 layui-col-lg3 com_white-right site-wrap-right"> <div id="qoyqs8suu2u" class=""> <div id="qoyqs8suu2u" class="com_layuiright-box user-msgbox"> <a href="http://systransis.cn/yun/u-1350.html"><img src="http://systransis.cn/yun/data/avatar/000/00/13/small_000001350.jpg" alt=""></a> <h3><a href="http://systransis.cn/yun/u-1350.html" rel="nofollow">lijy91</a></h3> <h6>男<span>|</span>高級(jí)講師</h6> <div id="qoyqs8suu2u" class="flex_box_zd user-msgbox-atten"> <a href="javascript:attentto_user(1350)" id="attenttouser_1350" class="grad follow-btn notfollow attention">我要關(guān)注</a> <a href="javascript:login()" title="發(fā)私信" >我要私信</a> </div> <div id="qoyqs8suu2u" class="user-msgbox-list flex_box_zd"> <h3 class="hpf">TA的文章</h3> <a href="http://systransis.cn/yun/ut-1350.html" class="box_hxjz">閱讀更多</a> </div> <ul class="user-msgbox-ul"> <li><h3 class="ellipsis"><a href="http://systransis.cn/yun/122935.html">Dmit,全新日本Pro VPS 8折,100M大帶寬,CN2 GIA/10099(9929)/CM</a></h3> <p>閱讀 3132<span>·</span>2021-11-10 11:36</p></li> <li><h3 class="ellipsis"><a href="http://systransis.cn/yun/122432.html">實(shí)戰(zhàn)!《長津湖》為什么這么火爆?我用 Python 來分析貓眼影評(píng)</a></h3> <p>閱讀 3328<span>·</span>2021-10-13 09:40</p></li> <li><h3 class="ellipsis"><a href="http://systransis.cn/yun/121081.html">Arduino開發(fā)-TFT_eSPI庫學(xué)習(xí)</a></h3> <p>閱讀 6162<span>·</span>2021-09-26 09:46</p></li> <li><h3 class="ellipsis"><a href="http://systransis.cn/yun/117294.html">天天都在使用CSS,那么CSS的原理是什么呢?</a></h3> <p>閱讀 676<span>·</span>2019-08-30 15:55</p></li> <li><h3 class="ellipsis"><a href="http://systransis.cn/yun/116679.html">Codepen 每日精選(2018-4-10)</a></h3> <p>閱讀 1424<span>·</span>2019-08-30 15:53</p></li> <li><h3 class="ellipsis"><a href="http://systransis.cn/yun/112793.html">CSS網(wǎng)格布局基礎(chǔ)</a></h3> <p>閱讀 1593<span>·</span>2019-08-29 13:55</p></li> <li><h3 class="ellipsis"><a href="http://systransis.cn/yun/112136.html">純CSS的星級(jí)評(píng)價(jià)效果</a></h3> <p>閱讀 3007<span>·</span>2019-08-29 12:46</p></li> <li><h3 class="ellipsis"><a href="http://systransis.cn/yun/111993.html">CSS題目及答案整理</a></h3> <p>閱讀 3223<span>·</span>2019-08-29 12:34</p></li> </ul> </div> <!-- 文章詳情右側(cè)廣告--> <div id="qoyqs8suu2u" class="com_layuiright-box"> <h6 class="top-com-title"><span>最新活動(dòng)</span></h6> <div id="qoyqs8suu2u" class="com_adbox"> <div id="qoyqs8suu2u" class="layui-carousel" id="right-item"> <div carousel-item> <div> <a href="http://systransis.cn/site/active/kuaijiesale.html?ytag=seo" rel="nofollow"> <img src="http://systransis.cn/yun/data/attach/240625/2rTjEHmi.png" alt="云服務(wù)器"> </a> </div> <div> <a href="http://systransis.cn/site/product/gpu.html" rel="nofollow"> <img src="http://systransis.cn/yun/data/attach/240807/7NjZjdrd.png" alt="GPU云服務(wù)器"> </a> </div> </div> </div> </div> <!-- banner結(jié)束 --> <div id="qoyqs8suu2u" class="adhtml"> </div> <script> $(function(){ $.ajax({ type: "GET", url:"http://systransis.cn/yun/ad/getad/1.html", cache: false, success: function(text){ $(".adhtml").html(text); } }); }) </script> </div> </div> </div> </div> </div> </section> <!-- wap拉出按鈕 --> <div id="qoyqs8suu2u" class="site-tree-mobile layui-hide"> <i class="layui-icon layui-icon-spread-left"></i> </div> <!-- wap遮罩層 --> <div id="qoyqs8suu2u" class="site-mobile-shade"></div> <!--付費(fèi)閱讀 --> <div class="qoyqs8suu2u" id="payread"> <div id="qoyqs8suu2u" class="layui-form-item">閱讀需要支付1元查看</div> <div id="qoyqs8suu2u" class="layui-form-item"><button class="btn-right">支付并查看</button></div> </div> <script> var prei=0; $(".site-seo-depict pre").each(function(){ var html=$(this).html().replace("<code>","").replace("</code>","").replace('<code class="javascript hljs" codemark="1">',''); $(this).attr('data-clipboard-text',html).attr("id","pre"+prei); $(this).html("").append("<code>"+html+"</code>"); prei++; }) $(".site-seo-depict img").each(function(){ if($(this).attr("src").indexOf('data:image/svg+xml')!= -1){ $(this).remove(); } }) $("LINK[href*='style-49037e4d27.css']").remove(); $("LINK[href*='markdown_views-d7a94ec6ab.css']").remove(); layui.use(['jquery', 'layer','code'], function(){ $("pre").attr("class","layui-code"); $("pre").attr("lay-title",""); $("pre").attr("lay-skin",""); layui.code(); $(".layui-code-h3 a").attr("class","copycode").html("復(fù)制代碼 ").attr("onclick","copycode(this)"); }); function copycode(target){ var id=$(target).parent().parent().attr("id"); var clipboard = new ClipboardJS("#"+id); clipboard.on('success', function(e) { e.clearSelection(); alert("復(fù)制成功") }); clipboard.on('error', function(e) { alert("復(fù)制失敗") }); } //$(".site-seo-depict").html($(".site-seo-depict").html().slice(0, -5)); </script> <link rel="stylesheet" type="text/css" href="http://systransis.cn/yun/static/js/neweditor/code/styles/tomorrow-night-eighties.css"> <script src="http://systransis.cn/yun/static/js/neweditor/code/highlight.pack.js" type="text/javascript"></script> <script src="http://systransis.cn/yun/static/js/clipboard.js"></script> <script>hljs.initHighlightingOnLoad();</script> <script> function setcode(){ var _html=''; document.querySelectorAll('pre code').forEach((block) => { var _tmptext=$.trim($(block).text()); if(_tmptext!=''){ _html=_html+_tmptext; console.log(_html); } }); } </script> <script> function payread(){ layer.open({ type: 1, title:"付費(fèi)閱讀", shadeClose: true, content: $('#payread') }); } // 舉報(bào) function jupao_tip(){ layer.open({ type: 1, title:false, shadeClose: true, content: $('#jubao') }); } $(".getcommentlist").click(function(){ var _id=$(this).attr("dataid"); var _tid=$(this).attr("datatid"); $("#articlecommentlist"+_id).toggleClass("hide"); var flag=$("#articlecommentlist"+_id).attr("dataflag"); if(flag==1){ flag=0; }else{ flag=1; //加載評(píng)論 loadarticlecommentlist(_id,_tid); } $("#articlecommentlist"+_id).attr("dataflag",flag); }) $(".add-comment-btn").click(function(){ var _id=$(this).attr("dataid"); $(".formcomment"+_id).toggleClass("hide"); }) $(".btn-sendartcomment").click(function(){ var _aid=$(this).attr("dataid"); var _tid=$(this).attr("datatid"); var _content=$.trim($(".commenttext"+_aid).val()); if(_content==''){ alert("評(píng)論內(nèi)容不能為空"); return false; } var touid=$("#btnsendcomment"+_aid).attr("touid"); if(touid==null){ touid=0; } addarticlecomment(_tid,_aid,_content,touid); }) $(".button_agree").click(function(){ var supportobj = $(this); var tid = $(this).attr("id"); $.ajax({ type: "GET", url:"http://systransis.cn/yun/index.php?topic/ajaxhassupport/" + tid, cache: false, success: function(hassupport){ if (hassupport != '1'){ $.ajax({ type: "GET", cache:false, url: "http://systransis.cn/yun/index.php?topic/ajaxaddsupport/" + tid, success: function(comments) { supportobj.find("span").html(comments+"人贊"); } }); }else{ alert("您已經(jīng)贊過"); } } }); }); function attenquestion(_tid,_rs){ $.ajax({ //提交數(shù)據(jù)的類型 POST GET type:"POST", //提交的網(wǎng)址 url:"http://systransis.cn/yun/favorite/topicadd.html", //提交的數(shù)據(jù) data:{tid:_tid,rs:_rs}, //返回?cái)?shù)據(jù)的格式 datatype: "json",//"xml", "html", "script", "json", "jsonp", "text". //在請(qǐng)求之前調(diào)用的函數(shù) beforeSend:function(){}, //成功返回之后調(diào)用的函數(shù) success:function(data){ var data=eval("("+data+")"); console.log(data) if(data.code==2000){ layer.msg(data.msg,function(){ if(data.rs==1){ //取消收藏 $(".layui-layer-tips").attr("data-tips","收藏文章"); $(".layui-layer-tips").html('<i class="fa fa-heart-o"></i>'); } if(data.rs==0){ //收藏成功 $(".layui-layer-tips").attr("data-tips","已收藏文章"); $(".layui-layer-tips").html('<i class="fa fa-heart"></i>') } }) }else{ layer.msg(data.msg) } } , //調(diào)用執(zhí)行后調(diào)用的函數(shù) complete: function(XMLHttpRequest, textStatus){ postadopt=true; }, //調(diào)用出錯(cuò)執(zhí)行的函數(shù) error: function(){ //請(qǐng)求出錯(cuò)處理 postadopt=false; } }); } </script> <footer> <div id="qoyqs8suu2u" class="layui-container"> <div id="qoyqs8suu2u" class="flex_box_zd"> <div id="qoyqs8suu2u" class="left-footer"> <h6><a href="http://systransis.cn/"><img src="http://systransis.cn/yun/static/theme/ukd//images/logo.png" alt="UCloud (優(yōu)刻得科技股份有限公司)"></a></h6> <p>UCloud (優(yōu)刻得科技股份有限公司)是中立、安全的云計(jì)算服務(wù)平臺(tái),堅(jiān)持中立,不涉足客戶業(yè)務(wù)領(lǐng)域。公司自主研發(fā)IaaS、PaaS、大數(shù)據(jù)流通平臺(tái)、AI服務(wù)平臺(tái)等一系列云計(jì)算產(chǎn)品,并深入了解互聯(lián)網(wǎng)、傳統(tǒng)企業(yè)在不同場景下的業(yè)務(wù)需求,提供公有云、混合云、私有云、專有云在內(nèi)的綜合性行業(yè)解決方案。</p> </div> <div id="qoyqs8suu2u" class="right-footer layui-hidemd"> <ul class="flex_box_zd"> <li> <h6>UCloud與云服務(wù)</h6> <p><a href="http://systransis.cn/site/about/intro/">公司介紹</a></p> <p><a >加入我們</a></p> <p><a href="http://systransis.cn/site/ucan/onlineclass/">UCan線上公開課</a></p> <p><a href="http://systransis.cn/site/solutions.html" >行業(yè)解決方案</a></p> <p><a href="http://systransis.cn/site/pro-notice/">產(chǎn)品動(dòng)態(tài)</a></p> </li> <li> <h6>友情鏈接</h6> <p><a >GPU算力平臺(tái)</a></p> <p><a >UCloud私有云</a></p> <p><a >SurferCloud</a></p> <p><a >工廠仿真軟件</a></p> <p><a >Pinex</a></p> <p><a >AI繪畫</a></p> </li> <li> <h6>社區(qū)欄目</h6> <p><a href="http://systransis.cn/yun/column/index.html">專欄文章</a></p> <p><a href="http://systransis.cn/yun/udata/">專題地圖</a></p> </li> <li> <h6>常見問題</h6> <p><a href="http://systransis.cn/site/ucsafe/notice.html" >安全中心</a></p> <p><a href="http://systransis.cn/site/about/news/recent/" >新聞動(dòng)態(tài)</a></p> <p><a href="http://systransis.cn/site/about/news/report/">媒體動(dòng)態(tài)</a></p> <p><a href="http://systransis.cn/site/cases.html">客戶案例</a></p> <p><a href="http://systransis.cn/site/notice/">公告</a></p> </li> <li> <span><img src="https://static.ucloud.cn/7a4b6983f4b94bcb97380adc5d073865.png" alt="優(yōu)刻得"></span> <p>掃掃了解更多</p></div> </div> <div id="qoyqs8suu2u" class="copyright">Copyright ? 2012-2023 UCloud 優(yōu)刻得科技股份有限公司<i>|</i><a rel="nofollow" >滬公網(wǎng)安備 31011002000058號(hào)</a><i>|</i><a rel="nofollow" ></a> 滬ICP備12020087號(hào)-3</a><i>|</i> <script type="text/javascript" src="https://gyfk12.kuaishang.cn/bs/ks.j?cI=197688&fI=125915" charset="utf-8"></script> <script> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://#/hm.js?290c2650b305fc9fff0dbdcafe48b59d"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-DZSMXQ3P9N"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-DZSMXQ3P9N'); </script> <script> (function(){ var el = document.createElement("script"); el.src = "https://lf1-cdn-tos.bytegoofy.com/goofy/ttzz/push.js?99f50ea166557aed914eb4a66a7a70a4709cbb98a54ecb576877d99556fb4bfc3d72cd14f8a76432df3935ab77ec54f830517b3cb210f7fd334f50ccb772134a"; el.id = "ttzz"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(el, s); })(window) </script></div> </div> </footer> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://systransis.cn/" title="成人国产在线小视频_日韩寡妇人妻调教在线播放_色成人www永久在线观看_2018国产精品久久_亚洲欧美高清在线30p_亚洲少妇综合一区_黄色在线播放国产_亚洲另类技巧小说校园_国产主播xx日韩_a级毛片在线免费">成人国产在线小视频_日韩寡妇人妻调教在线播放_色成人www永久在线观看_2018国产精品久久_亚洲欧美高清在线30p_亚洲少妇综合一区_黄色在线播放国产_亚洲另类技巧小说校园_国产主播xx日韩_a级毛片在线免费</a> <div class="friend-links"> </div> </div> </footer> <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body><div id="ceuqi" class="pl_css_ganrao" style="display: none;"><strong id="ceuqi"><abbr id="ceuqi"><samp id="ceuqi"></samp></abbr></strong><del id="ceuqi"></del><tbody id="ceuqi"></tbody><noscript id="ceuqi"></noscript><rt id="ceuqi"></rt><pre id="ceuqi"></pre><noscript id="ceuqi"></noscript><small id="ceuqi"></small><del id="ceuqi"><dfn id="ceuqi"><td id="ceuqi"></td></dfn></del><optgroup id="ceuqi"></optgroup><abbr id="ceuqi"></abbr><input id="ceuqi"></input><abbr id="ceuqi"><pre id="ceuqi"><blockquote id="ceuqi"></blockquote></pre></abbr><s id="ceuqi"></s><pre id="ceuqi"></pre><small id="ceuqi"><noframes id="ceuqi"><samp id="ceuqi"></samp></noframes></small><sup id="ceuqi"><center id="ceuqi"><fieldset id="ceuqi"></fieldset></center></sup><object id="ceuqi"></object><rt id="ceuqi"></rt><dd id="ceuqi"></dd><strike id="ceuqi"><s id="ceuqi"><noscript id="ceuqi"></noscript></s></strike><pre id="ceuqi"></pre><td id="ceuqi"><fieldset id="ceuqi"><table id="ceuqi"></table></fieldset></td><noframes id="ceuqi"><ul id="ceuqi"><tbody id="ceuqi"></tbody></ul></noframes><object id="ceuqi"><tbody id="ceuqi"><button id="ceuqi"></button></tbody></object><tbody id="ceuqi"></tbody><rt id="ceuqi"></rt><tr id="ceuqi"></tr><tbody id="ceuqi"></tbody><ul id="ceuqi"></ul><table id="ceuqi"></table><dd id="ceuqi"></dd><table id="ceuqi"></table><object id="ceuqi"></object><noscript id="ceuqi"></noscript><source id="ceuqi"></source><noscript id="ceuqi"></noscript><source id="ceuqi"></source><object id="ceuqi"></object><input id="ceuqi"></input><th id="ceuqi"></th><th id="ceuqi"></th><table id="ceuqi"></table><ul id="ceuqi"><pre id="ceuqi"><source id="ceuqi"></source></pre></ul><cite id="ceuqi"><abbr id="ceuqi"><kbd id="ceuqi"></kbd></abbr></cite><abbr id="ceuqi"><ul id="ceuqi"><pre id="ceuqi"></pre></ul></abbr><abbr id="ceuqi"><pre id="ceuqi"><blockquote id="ceuqi"></blockquote></pre></abbr><tr id="ceuqi"></tr><li id="ceuqi"><center id="ceuqi"><xmp id="ceuqi"></xmp></center></li><noscript id="ceuqi"><option id="ceuqi"><xmp id="ceuqi"></xmp></option></noscript></div> <script src="http://systransis.cn/yun/static/theme/ukd/js/common.js"></script> <<script type="text/javascript"> $(".site-seo-depict *,.site-content-answer-body *,.site-body-depict *").css("max-width","100%"); </script> </html>