UI自動化梳理,keywords

2021-09-25 15:15:18 字數 2672 閱讀 9242

*** settings ***

library           datetime

resource          variable.txt

*** keywords ***

[arguments]    $    &

[arguments]    $    $    $    $    $=1000

[arguments]    $    $

$    $【定位器】#輸入文字

[arguments]    $    $

輸入文字

[arguments]    $=

$    evaluate    time.strftime("%y%m%d%h%m%s", time.localtime())    time

[arguments]    $

$    evaluate    int($)

[arguments]    $

[arguments]    $

$    get time

$    add time to date    $    $    %y-%m-%d

[return]    $

[arguments]    $

[documentation]    scrolls up to element

...    向上滾動到元素

[arguments]    $

[documentation]    scrolls down to element

......    向下滾動到元素

[arguments]    $    $

sleep    1

sleep    2

[arguments]    $    $=5

: for    $    in range    $

\    sleep    1

\    ...    else    exit for loop

[arguments]    $

[arguments]    $

sleep    2

*** settings ***

*** keywords ***

[arguments]    $

[arguments]    $

[arguments]    $    $

[arguments]    $

[arguments]    $    $    $=100

*** settings ***

*** keywords ***

[arguments]    $

[return]    $

[arguments]    $    $

[return]    $

【屬性】

[arguments]    $

[return]    $

[arguments]    $

[return]    $

[arguments]    $

[return]    $

[return]    $

[return]    $

[return]    $

[return]    $

[return]    $

[return]    $

*** settings ***

*** keywords ***

[arguments]    $

[arguments]    $

[arguments]    $    $

[arguments]    $

[arguments]    $

[arguments]    $    $

[arguments]    $    $

[arguments]    $    $

[arguments]    $    $

[arguments]    $

[arguments]    $

[arguments]    $

[arguments]    $

[arguments]    $    $

*** settings ***

library           operatingsystem

*** keywords ***

[arguments]    $

run    $

【執行】

*** variables ***

$      10   秒

$    3

$     1

$     300   毫秒

$     允許/

同意*** settings ***

library           datetime

*** keywords ***

[arguments]    $    $=10    $='等待元素可見超時'

[arguments]    $    $=10    $='等待頁面包含text超時'

[arguments]    $    $=10    $='等待頁面不包含text超時'

[arguments]    $    $=10    $='等待頁面包含元素超時'

[arguments]    $    $=10    $='等待頁面不包含元素超時'

UI 自動化設計思路

近來負責測試的產品,頁面上全都是圖表資料,頁面上互動少,可以說沒有。正對這樣的產品自動化,做了一些自動化方面思路整理 自動化測試用例編寫守則 首先,我們要確定一點,就是自動化的目的和作用。自動化測試是為了代替人執行需要大量重複的規律性或 無規律 的工作,它的主要目的在於驗證問題而不是發現問題 所以我...

UI自動化測試隨筆

昨天給開發的同事講我們正在做的自動化測試,同事問了句 為什麼api的測試不需要寫 了,而ui的測試還需要寫那麼多 呢?能不寫 麼?目前我們的自動化測試的現狀 目前主要覆蓋兩個部分 api的測試和ui的測試。對於api的測試經過框架的封裝,基本上只需要編寫乙個xml描述的test case就可以了,x...

UI自動化元素定位

1.id定位 find element by id self,id 2.name定位 find element by name self,name 3.class定位 find element by class name self,name 4.tag定位 find element by tag n...