参考文章:
https://adamtheautomator.com/selenium-powershell/#Making_Selenium_PowerShell_Work
https://www.pstips.net/selenium-powershell-extensions.html
一、准备工作:
①下载适合Powershell的selenium webdriver.dll文件。 下载链接: https://www.selenium.dev/downloads/ 选择 C# 语言版本下载。
下载后的文件是nupkg格式的。如:
selenium.webdriver.4.1.0.nupkg
z直接改后缀名为.zip,然后直接解压出来就行。如改为:
selenium.webdriver.4.1.0.nupkg.zip
解压后在以下文件夹里面以下路径找到WebDriver.dll
这个文件。
selenium.webdriver.4.1.0.nupkg\lib\net45
②下载浏览器对应版本的浏览器驱动
谷歌浏览器:
https://chromedriver.chromium.org/downloads
Edge浏览器:
https://developer.m