Selenium2Library系列 keywords 之 _SelectElementKeywords 之 page_should_contain_list(self, locator, messa...

本文介绍了一个用于自动化测试的方法page_should_contain_list,该方法用于验证指定的select list是否出现在当前页面上。通过传递定位器参数可以轻松定位目标元素,并且支持自定义消息及日志级别。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 1     def page_should_contain_list(self, locator, message='', loglevel='INFO'):
 2         """Verifies select list identified by `locator` is found from current page.
 3 
 4         See `Page Should Contain Element` for explanation about `message` and
 5         `loglevel` arguments.
 6 
 7         Key attributes for lists are `id` and `name`. See `introduction` for
 8         details about locating elements.
 9         """
10         self._page_should_contain_element(locator, 'list', message, loglevel)

 

方法名:page_should_contain_list(self, locator, message='', loglevel='INFO')

相似方法:

公共方法 验证select list 存在于当前页面

接收参数:locator,message='',loglevel='INFO'

10行:使用_page_should_contain_element(locator, 'list', message, loglevel)

转载于:https://www.cnblogs.com/loveok-56/p/4464077.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值