Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update appium/drivers versions #22552

Merged
merged 23 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/pipelines/common/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ variables:
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: true
- name: DOTNET_VERSION
value: 8.0.101
value: 8.0.300
- name: REQUIRED_XCODE
value: 15.2.0
- name: DEVICETESTS_REQUIRED_XCODE
Expand Down
44 changes: 33 additions & 11 deletions eng/scripts/appium-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,49 @@ Find the script for that on the DevDiv Azure DevOps instance, Engineering team,

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See lines just above here. This should ideally match what is on the agents? @rmarinho ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we can ask @mjbond-msft to update botdeploy script.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So my latest changes install the drivers to a local directory, so those versions won't matter to the botdeploy script, but we can ask @mjbond-msft maybe to update the appium version itself (in this case it will now be the latest 2.5.4), since that we are still globally updating.

param
(
[string] $appiumVersion = '2.1.1',
[string] $windowsDriverVersion = '2.10.1',
[string] $androidDriverVersion = '2.29.4',
[string] $iOSDriverVersion = '5.2.0',
[string] $macDriverVersion = '1.7.2'
[string] $appiumVersion = '2.5.4',
[string] $windowsDriverVersion = '2.12.23',
[string] $androidDriverVersion = '3.5.1',
[string] $iOSDriverVersion = '7.16.1',
[string] $macDriverVersion = '1.17.3'
)

Write-Output "Welcome to the Appium installer"

Write-Output "Node version"
node -v

Write-Output "Installing appium $appiumVersion"
npm install -g appium@$appiumVersion
# If there's a ~/.appium folder, remove it as it can cause issues from v1
# it might also generally have caching issues for us with our runs
$appiumUserData = "$env:USERPROFILE/.appium"
if (Test-Path $appiumUserData) {
Write-Output "Removing $appiumUserData"
Remove-Item -Path $appiumUserData -Force -Recurse
}
jfversluis marked this conversation as resolved.
Show resolved Hide resolved

write-Output "Installed appium"
appium -v
# Check for an existing appium install version
$appiumCurrentVersion = ""
try { $appiumCurrentVersion = appium -v | Out-String } catch { }

Write-Output "Installing appium doctor"
npm install -g appium-doctor
if ($appiumCurrentVersion) {
Write-Output "Existing Appium version $appiumCurrentVersion"
} else {
Write-Output "No Appium version installed"
}

# If current version does not match the one we want, uninstall and install the new version
if ($appiumCurrentVersion -ne $appiumVersion) {
Write-Output "Uninstalling appium $appiumCurrentVersion"
npm uninstall -g appium
Write-Output "Uninstalled appium $appiumCurrentVersion"

Write-Output "Installing appium $appiumVersion"
npm install -g appium@$appiumVersion
write-Output "Installed appium $appiumVersion"
}

Write-Output "Installing appium doctor"
npm install -g @appium/doctor
Redth marked this conversation as resolved.
Show resolved Hide resolved
Write-Output "Installed appium doctor"

$existingDrivers = appium driver list --installed --json | ConvertFrom-Json
Expand Down