博客园  :: 首页  :: 管理

随笔分类 -  [06]DevOps/CICD / 浏览器自动化-Selenium

摘要:在 Power Automate(特别是桌面流 Desktop Flow 或 Web 自动化)中,当你使用 CSS 选择器来定位网页元素时, :nth-child() 和 :eq() 是两个常见的伪类/伪选择器,但它们的含义和行为有显著区别。 1. :nth-child(n) 标准 CSS 伪类,被 阅读全文

posted @ 2025-12-27 22:30 520_1351 阅读(5) 评论(0) 推荐(0)

摘要:最近在使用selenium实现浏览器自动化,使用的 inprivate 无痕模式, 加载过一个 扩展 但是又同时需要加载另一个PAD的扩展,按如下写法就发现,生效的只有最后一个 options.add_argument(r"--load-extension=C:\Users\qq5201351\Ap 阅读全文

posted @ 2025-12-26 13:37 520_1351 阅读(7) 评论(0) 推荐(0)

摘要:使用如下命令,打开Chrome浏览器,并启动远程调试功能 "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="c:\cm" 其中用户数据目录复制于默 阅读全文

posted @ 2025-08-11 10:01 520_1351 阅读(117) 评论(0) 推荐(0)

摘要:关于 元素的 class 属性值 的简单应用: <!-- 示例元素 - Auther QQ:5201351 --> <button class="submit-btn">Click</button> 元素的定位,可以使用 By.CLASS_NAME button = driver.find_elem 阅读全文

posted @ 2025-08-06 16:56 520_1351 阅读(16) 评论(0) 推荐(0)

摘要:关于Ali Cloud / 阿里云 ,对于视频点播的访问日志,如果没有配置,日志推送 的情况下 默认只能看到一个月的访问日志,如果有大量访问的情况,基本上就是每小时一个日志,一天24个日志.gz格式的文件 但是要下载所有的访问日志,却只能一个一个的下载,于是笔者想到可以使用python,基于 Sel 阅读全文

posted @ 2025-07-28 19:07 520_1351 阅读(18) 评论(0) 推荐(0)

摘要:笔者使用的环境:webdriver.Edge import time from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys impo 阅读全文

posted @ 2025-07-09 10:27 520_1351 阅读(27) 评论(0) 推荐(0)

摘要:在Python中使用Selenium关闭浏览器主要有两种方式,它们的区别和用法如下: 首先笔者使用的环境为:webdriver.Edge 浏览器 from selenium import webdriver from selenium.webdriver.edge.options import Op 阅读全文

posted @ 2025-07-07 22:33 520_1351 阅读(90) 评论(0) 推荐(0)

摘要:python脚本,使用selenium 打开一个url后,默认就会退出,本文的浏览器为:Edge浏览器 如果需要让浏览器不关闭,手动做一些操作,一般可以使用time模块的sleep(999999) 方式 当然今天推荐的是另一种,即配置options选项,options.add_experimenta 阅读全文

posted @ 2025-06-05 13:05 520_1351 阅读(314) 评论(0) 推荐(0)

摘要:本文以Edge浏览器为例 ,使用python中的selenium模块 常用的一些选项如下: from selenium import webdriver from selenium.webdriver.edge.options import Options options = Options() # 阅读全文

posted @ 2025-06-04 17:05 520_1351 阅读(180) 评论(0) 推荐(0)