1

这个范围/系列是关于测试自动化的。向这个世界的 CEO 和经理展示(在所有工作完成后的稍后时刻)Tosca 和 fe RobotFrameWork 之间究竟有什么区别。

就像 FlurFunk 对 Tosca 所做的那样,结果将在 Youtube 上。(https://www.youtube.com/channel/UCR5i6k5emJ6hxox-iQcv85Q

但在某些情况下,我会遇到困难,我需要社区的帮助。

这个难题是关于单击按钮直到名称更改https://obstaclecourse.tricentis.com/Obstacles/94441

到目前为止我得到的是:

    *** Settings ***
# https://robotframework-browser.org/
Library   Browser
Library    String
#Library  Tables
#Title is:  TESTING METHODS

*** Variables ***
@{LIST}   | Functional | End2End | GUI testing | Exploratory Testing |

*** Test Cases ***
Example Test 70310
    Browser.OPEN BROWSER  https://obstaclecourse.tricentis.com/Obstacles/94441
    Select Options By    value   select[id='multiselect']   Functional    End2End    GUI testing    Exploratory Testing
    Get Text         xpath=//body    *=   You solved this automation problem.
    # used resources

这导致:

ValueError: Argument 'attribute' got value 'select[id='multiselect']' that cannot be converted to SelectAttribute: SelectAttribute does not have member 'select[id='multiselect']'. Available: 'index', 'label', 'text' and 'value'
4

1 回答 1

1

终于让它工作了。但是...我无法找到使用“浏览器”库的方法...所以我不得不使用“SeleniumLibrary”

经过多次尝试,这导致了| 通过 |

 OPEN BROWSER  https://obstaclecourse.tricentis.com/Obstacles/94441       
    SET BROWSER IMPLICIT WAIT    3
    SeleniumLibrary.SELECT FROM LIST BY LABEL        id=multiselect    Functional testing    End2End testing    GUI testing    Exploratory testing
    SET BROWSER IMPLICIT WAIT    3

它明确必须是“按标签”,这才是关键。

于 2021-09-28T12:18:57.493 回答