-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support
npx playwright install msedge
- Loading branch information
1 parent
a836466
commit 56e0b02
Showing
14 changed files
with
258 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
$url = 'https://dl.google.com/tag/s/dl/chrome/install/beta/googlechromestandaloneenterprise.msi'; | ||
$url = 'https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise.msi'; | ||
|
||
if ([Environment]::Is64BitProcess) { | ||
$url = 'https://dl.google.com/tag/s/dl/chrome/install/beta/googlechromestandaloneenterprise64.msi' | ||
} | ||
|
||
$app = Get-WmiObject -Class Win32_Product | Where-Object { | ||
$_.Name -eq "Google Chrome" | ||
} | ||
if ($app) { | ||
$app.Uninstall() | ||
$url = 'https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise64.msi' | ||
} | ||
|
||
$wc = New-Object net.webclient | ||
$msiInstaller = "$env:temp\google-chrome.msi" | ||
Remove-Item $msiInstaller | ||
Write-Host "Downloading Google Chrome" | ||
$wc.Downloadfile($url, $msiInstaller) | ||
|
||
Write-Host "Installing Google Chrome" | ||
$arguments = "/i `"$msiInstaller`" /quiet" | ||
Start-Process msiexec.exe -ArgumentList $arguments -Wait | ||
Remove-Item $msiInstaller | ||
|
||
|
||
$suffix = "\\Google\\Chrome\\Application\\chrome.exe" | ||
if (Test-Path "${env:ProgramFiles(x86)}$suffix") { | ||
(Get-Item "${env:ProgramFiles(x86)}$suffix").VersionInfo | ||
} elseif (Test-Path "${env:ProgramFiles}$suffix") { | ||
(Get-Item "${env:ProgramFiles}$suffix").VersionInfo | ||
} else { | ||
write-host "ERROR: failed to install Google Chrome" | ||
exit 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -e | ||
set -x | ||
|
||
cd /tmp | ||
curl -o ./msedge_stable.pkg -k "$1" | ||
# Note: there's no way to uninstall previously installed MSEdge. | ||
# However, running PKG again seems to update installation. | ||
sudo installer -pkg /tmp/msedge_stable.pkg -target / | ||
/Applications/Microsoft\ Edge.app/Contents/MacOS/Microsoft\ Edge --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
$url = $args[0] | ||
|
||
Write-Host "Downloading Microsoft Edge" | ||
$wc = New-Object net.webclient | ||
$msiInstaller = "$env:temp\microsoft-edge-stable.msi" | ||
$wc.Downloadfile($url, $msiInstaller) | ||
|
||
Write-Host "Installing Microsoft Edge" | ||
$arguments = "/i `"$msiInstaller`" /quiet" | ||
Start-Process msiexec.exe -ArgumentList $arguments -Wait | ||
Remove-Item $msiInstaller | ||
|
||
$suffix = "\\Microsoft\\Edge\\Application\\msedge.exe" | ||
if (Test-Path "${env:ProgramFiles(x86)}$suffix") { | ||
(Get-Item "${env:ProgramFiles(x86)}$suffix").VersionInfo | ||
} elseif (Test-Path "${env:ProgramFiles}$suffix") { | ||
(Get-Item "${env:ProgramFiles}$suffix").VersionInfo | ||
} else { | ||
write-host "ERROR: failed to install Microsoft Edge" | ||
exit 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.