python - 如何在 python selenium 中执行“https://raw.githubusercontent.com/GoogleChrome/accessibility-developer-tools/stable/dist/js/axs_testing.js”网址?
问题描述
我正在尝试使用 python selenium 编写以下代码,但由于我是 python 和 selenium 的新手,所以无法做到这一点。有人可以帮忙吗?
val driver = org.openqa.selenium.firefox.FirefoxDriver //use driver of your choice
val jse = driver.asInstanceOf[JavascriptExecutor]
jse.executeScript(scala.io.Source.fromURL("https://raw.githubusercontent.com/GoogleChrome/" +
"accessibility-developer-tools/stable/dist/js/axs_testing.js").mkString)
val report = jse.executeScript("var results = axs.Audit.run();return axs.Audit.createReport(results);")
println(report)
解决方案
推荐阅读
- python - 参数列表中的函数
- java - 如何在列表中设置 OnItemClickListner 以播放音频
- vert.x - 与 Vertx 的多个并发连接
- python - 我正在尝试在python中读取一个utf-8文件并保留BOM,但是当我执行file.read时会自动删除BOM
- python - TypeError: ufunc 'subtract' 不包含签名匹配类型 dtype('
我在减去数据表的两列时遇到问题,我是 python 新手,在尝试研究如何解决这个问题失败后,我想知道是否有人有任何见解。我的代码是这样的:
response = qc.query(token, sql=query, fmt='pandas') result =
- android-studio - 如何停用颤振小部件树中的指南,如附图
- variables - 如何在 AnyLogic 运行时更改具有不同分布的总体变量
- arrays - 如何使用 laravel 将带有数组的表单数据插入数据库
- tfvc - TFVC 没有出现在源代码管理 VS Code 中
- apache-spark - 将文本文件数据过滤为 pyspark rdd 和数据框中的列