vba - Selenium VBA 更改属性
问题描述
这是我的html代码:
<input id="drugCodeId_focus" name="drugCodeId_focus" type="text" autocomplete="off" role="combobox" aria-haspopup="true" aria-expanded="false" aria-autocomplete="list" aria-owns="drugCodeId_items" aria-activedescendant="drugCodeId_25" aria-describedby="drugCodeId_25" aria-disabled="false">
这是一个组合框,更改后“aria-activedescendant”的属性值和组合框的“aria- describeby”值将发生变化。帮助我将示例值“drugCodeId_25”更改为“drugCodeId_26”。
解决方案
你需要这个吗
driver.FindElementByXPath(".//input[@id='drugCodeId_focus']").SendKeys("your text here")
推荐阅读
- nginx - 如何创建 TCP 侦听器?
- sql - SQL 查询未得到结果
- java - 如何以编程方式调整设备的蓝牙灵敏度
- amazon-web-services - Amazon EC2 UTC 时区显示错误
- mysql - 如何支持基于 MySQL 中插入的数据创建新列
- android - FormsSeekBar.setPressed。在 Android 的 xamarin.forms 中引发了“Java.Interop.JavaLocationException”类型的异常
- android - 如何突出显示颤动中的选择文本?
- jquery - 按值 Jquery 设置 url 树枝
- android - 在简单的数组添加上,RenderScript 的运行速度比 Kotlin 慢
- javascript - 用数组值过滤数组对象