最近写公司web的自动化, 遇到了下拉框,是那种有select关键字我下拉框
下面是我们公司下拉框的显示以及源码:

第一步:
看到select关键字,我立马想起来使用select from list by value , 大致代码为:select from list by value locator 1
运行好的失败,报错元素不可见等错误(一般元素不可见只有一种情况)
报错信息:

于是只能绕其道而行之,使用点击点击去选择。但是firefox提供的xpath中,id是会动态改变的,所以选择了自己编写xpath:

网友评论