跳到主要内容

修改网页元素属性

有两种修改方式,一种是给元素的properties中的字段赋值(修改的是JS HTMLElement 对象),另一种是给元素的attributes中的字段赋值(修改的是html)。

示例

修改网页输入框的value,properties方式修改的是输入框显示的内容,attributes修改的是html中的value

web_element.properties.value = "properties.value"
web_element.attributes.value = "attributes.value"

除了修改value外您还可以其他property或者attribute,例如修改src,class,style等

提示

浏览器插件版本>=2.1.0

曲辕RPA版本>=7.6.0