【发布时间】:2017-02-11 02:31:51
【问题描述】:
我有一个我刚开始为其开发自动化的场景,但需要向页面添加项目,直到表格填满并且表格项目现在显示在两个页面上。
表格填满后,右上角的可用页数会增加一。
我想我会联系看看是否有人有创造性的方式在 Robot Framework 中执行操作,直到满足条件 - 在这种情况下,我会添加新的水果,直到右上角的页数变为 2。
[下面的解决方案]
*** Settings ***
Documentation Test case to validate paginatio
Suite Teardown Close all browsers
Library Selenium2Library
Resource config.txt
*** Test Cases ***
Login
[Documentation] Log in and load Fruit Table page
Login User ${admUser} ${admPwd}
Open Browser ${URL}/fruit_table.php
Validate Pagination Feature
[Documentation] Add Fruit table until page is added
Generate New Page
*** Keywords ***
Generate New Page
wait until keyword succeeds 2 minutes 2 seconds Fill Table
Fill Table
Create Table Entry
Validate new page is available
Create Table Entry
Create New Item
Fill Out Form ${ratfrm1} ${rat1}
Fill Out Form ${ratfrm2} ${rat2}
Click Submit Button
【问题讨论】: