测试积点老人 发表于 2022-7-7 11:28:39

selenium执行HTML的JS脚步

通过选择listbox的内容后面的label ID自动加载编号,手动在listbox中输入内容label ID则不会自动加载编号,我希望使用Selenium自动去执行选择listbox的清单,但是获取不到listbox的清单加载按钮的ID,可以通过ExcuteScript去执行js脚本吗?从哪里可以看到lustbox change的JS脚本,谢谢!见附图



listbox的元素信息
<span aria-haspopup="listbox" aria-describedby=" ARIA_CB_F4Lookup_TUT" tabindex="0" ti="0" id="WD0285" ct="CBS" lsdata="{0:'FREETEXT',2:'WD0286',4:'LABELFMTP2_SINGLELVL_OUTER',6:true,13:'CLIENT_SERVER_PREFIX',15:true,17:true,18:'VALUE1',24:'FILL'}" lsevents="{ActionItemActivate:[{ResponseData:'delta',ClientAction:'submit'},{}],Change:[{ResponseData:'delta',EnqueueCardinality:'single'},{}],DeleteItem:[{ResponseData:'delta'},{}],Select:[{ResponseData:'delta'},{}],ListAccess:[{ResponseData:'delta',ClientAction:'submitAsync'},{}],FieldHelpPress:[{ResponseData:'delta',ClientAction:'submit'},{}]}" name="WD0285" size="30" maxlength="30" class="lsField__input" title="">LABELFMTP2_SINGLELVL_OUTER</span>

qqq911 发表于 2022-7-8 11:13:35

敲下回车

郭小贱 发表于 2022-7-8 11:29:11

https://blog.csdn.net/gjj920318/article/details/120565642参考学习下。

jingzizx 发表于 2022-7-8 13:34:05

看一下能够识别到吗
页: [1]
查看完整版本: selenium执行HTML的JS脚步