蓝色天空.知识 · 实践 · 创造
我的收藏
在线代码实验室

Selenium安装:绑定、驱动和版本:独立本地浏览器实验

PYTHONWindows/Python3.12/Selenium4.52.0/Edge及驱动156.0.4314.58;GridServer4.52/Temurin21.0.13;独立无头会话selenium-install.py
selenium-install.py9 行
from selenium_lab import *

@case('selenium-install')
def install(l,d,b,s):
 l.eq('binding-version',selenium.__version__,'4.52.0');l.check('current-Service-argument','service'in inspect.signature(webdriver.Edge).parameters);l.check('old-executable_path-driverarg-absent','executable_path'not in inspect.signature(webdriver.Edge).parameters);l.check('actual-title',bool(d.title));l.eq('actual-driver-match',d.capabilities['msedge']['msedgedriverVersion'].split()[0],'156.0.4314.58');l.pending_case('Selenium-Manager-and-load-stop','Explicit signed localdriver used; automaticManager downloads and slownetwork/page_load_strategy/window.stop combinations not all executed')

if __name__ == "__main__":
    run('selenium-install')
本例需在 Windows/Python3.12/Selenium4.52.0/Edge及驱动156.0.4314.58;GridServer4.52/Temurin21.0.13;独立无头会话 中运行,请复制源码、保存文件或下载工程包后在本地执行验证。
运行说明与环境独立工程

运行环境:Windows/Python3.12/Selenium4.52.0/Edge及驱动156.0.4314.58;GridServer4.52/Temurin21.0.13;独立无头会话

入口文件:projects/selenium-lab/selenium-install.py

预期结果与验证条件观察提示
  • 本章固定输入断言通过,错误/等待/业务结果和退出分别验证
  • 截图对应本站当前测试页;未执行平台或能力不因本轮通过自动升级

请结合实际环境逐项观察。

附件与关联工程包下载

下载课程关联工程包:Selenium

课程关联工程包(登记关联15章) · 含当前章节或实例 · mbskycom202611a531.zip
SITE SEARCH

搜索教程、工具与资讯

热门搜索

JavaScriptJSON格式化正则表达式AI 编程AI 翻译AI导航专题标签
Esc 关闭

欢迎登录蓝色天空网

使用会员账号,继续你的学习