如何在python硒中提取“ https://raw.githubusercontent.com/GoogleChrome/accessibility-developer-tools/stable/dist/js/axs_testing.js”URL?

时间:2019-04-01 06:44:42

标签: python selenium-webdriver

我正在尝试使用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)

0 个答案:

没有答案