首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用RBFW解决了Tosca难题94441,测试方法)-无法转换为SelectAttribute

使用RBFW解决了Tosca难题94441,测试方法)-无法转换为SelectAttribute
EN

Stack Overflow用户
提问于 2021-09-28 11:27:36
回答 1查看 39关注 0票数 1

这个范围/系列是关于测试自动化的。在这个世界上,首席执行官和经理们(稍后当所有工作都完成的时候)展示了托斯卡和f.e.之间的确切区别。RobotFrameWork。

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

但在某些情况下,我会陷入困境,我需要来自社区的一些帮助。

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

到目前为止,我得到的是:

代码语言:javascript
复制
    *** 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

这会导致:

代码语言:javascript
复制
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'
EN

回答 1

Stack Overflow用户

发布于 2021-09-28 12:18:57

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

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

代码语言:javascript
复制
 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

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

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/69360881

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档