selenium设置元素隐藏和显示

1、在浏览器中的console输入 document.getElementById('xiaoyou-robot-wrapper').style='display:none'  隐藏页面图标

 

 2、

在浏览器中的console输入 document.getElementById('xiaoyou-robot-wrapper').style='display:none'  显示隐藏的页面图标

 3、脚本实现:

executeJavaScript("document.getElementById('"+id+"').style='display:none'");
posted @ 2021-06-04 10:13  keep2021  阅读(589)  评论(0编辑  收藏  举报