-
-
Notifications
You must be signed in to change notification settings - Fork 134
Expand file tree
/
Copy pathSelenium.ps1
More file actions
17 lines (13 loc) · 848 Bytes
/
Selenium.ps1
File metadata and controls
17 lines (13 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# https://github.com/GoogleChromeLabs/chrome-for-testing/blob/main/data/last-known-good-versions-with-downloads.json
# https://www.nuget.org/packages/selenium.webdriver
# https://www.nuget.org/packages/selenium.support
# https://developer.microsoft.com/microsoft-edge/tools/webdriver/
Import-Module "D:\Desktop\lib\net8.0\WebDriver.dll"
$Options = New-Object OpenQA.Selenium.Edge.EdgeOptions
$options = New-Object OpenQA.Selenium.Edge.EdgeOptions
$options.AddArgument("--headless=new")
$options.AddArgument("--window-size=1280,720")
$options.AddArgument("--user-agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0")
$driver = New-Object OpenQA.Selenium.Edge.EdgeDriver("D:\Desktop\lib\msedgedriver.exe", $Options)
$driver.Navigate().GoToUrl("URL")
#$driver.Quit()