Skip to content

Update to Appium v3.1#370

Merged
hawkeyexl merged 11 commits intomainfrom
copilot/update-to-appium-v3-1
Nov 4, 2025
Merged

Update to Appium v3.1#370
hawkeyexl merged 11 commits intomainfrom
copilot/update-to-appium-v3-1

Conversation

Copy link
Contributor

Copilot AI commented Nov 4, 2025

Update to Appium v3.1 ✅

Completed:

  • Research Appium v3 breaking changes and driver compatibility
  • Update package.json with new versions:
    • appium: 2.19.0 → 3.1.0
    • appium-chromium-driver: 1.5.1 → 2.0.2
    • appium-geckodriver: 1.4.3 → 2.0.6
    • appium-safari-driver: 3.5.25 → 4.0.1
    • geckodriver: 5.0.0 → 6.0.2
  • Install updated dependencies
  • Fix package-lock.json sync issue
  • Verify npm ci works correctly
  • Run security checks (no vulnerabilities found)

Summary:
Successfully migrated to Appium v3.1.0 and all compatible driver versions.

Changes:

  • Updated Appium and driver versions in package.json
  • Removed pinned sharp optionalDependencies (0.33.5) that conflicted with the sharp@0.34.4 dependency
  • Regenerated package-lock.json to be in sync with package.json
  • Verified npm ci works without errors

Testing:

  • npm ci works correctly
  • ✅ Simple unit tests pass
  • ✅ No security vulnerabilities in new dependencies
Original prompt

This section details on the original issue you should resolve

<issue_title>Update to Appium v3.1</issue_title>
<issue_description>Applium v3.1 is now available. We need to migrate to it. This also includes updates to all related packages:

  • appium
  • appium-chromium-driver
  • appium-geckodriver
  • appium-safari-driver
  • geckodriver

All current tests should pass without modification.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Summary by CodeRabbit

  • Chores
    • Updated test infrastructure to run on Node.js versions 20, 22, and 24 for broader compatibility testing.
    • Upgraded core dependencies including Appium, its associated drivers, and testing tools to latest stable versions.
    • Streamlined optional dependencies to optimize installation efficiency.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 4, 2025

Walkthrough

Migrated Appium framework to v3.1 with corresponding driver updates. Updated Appium readiness health check endpoint from /sessions to /status. Removed Node.js 18 from test matrix. Restructured optional dependencies in package.json and added overrides section.

Changes

Cohort / File(s) Summary
CI Workflow Configuration
.github/workflows/npm-test.yaml
Removed Node.js version 18 from test matrix; now tests against versions 20, 22, and 24 only.
Dependency Management
package.json
Updated Appium and drivers to v3: appium (^2.19.0 → ^3.1.0), appium-chromium-driver (1.5.1 → ^2.0.2), appium-geckodriver (^1.4.3 → ^2.0.6), appium-safari-driver (^3.5.25 → ^4.0.1). Updated axios (^1.13.1 → ^1.13.2) and geckodriver (^5.0.0 → ^6.0.2). Restructured optionalDependencies by removing multiple sharp-related entries and consolidating platform-specific installers. Added top-level overrides section mapping sharp to $sharp.
Test Code
src/tests.js
Changed Appium server readiness check from HTTP GET /sessions endpoint to /status endpoint. Re-indented two commented logging lines in output handlers.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • package.json: Multiple major version updates across Appium ecosystem require verification of compatibility and potential breaking changes
  • src/tests.js: New readiness endpoint (/status instead of /sessions) should be validated against Appium v3.1 API documentation
  • Optional dependencies restructuring: Review that consolidated dependencies maintain required platform support

Poem

🐰 Appium springs forward to v3's grace,
Old endpoints retire, new paths take their place,
Node eighteen hops away, twenty takes the lead,
Sharp edges smoothed down—just what we need!
Dependencies bundled, the future looks bright!

Pre-merge checks and finishing touches

✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title 'Update to Appium v3.1' directly matches the main objective and is concise, specific, and clearly summarizes the primary change.
Linked Issues check ✅ Passed All requirements from #369 are met: appium and all related drivers updated to compatible versions, tests pass, and migration to Appium v3.1 is complete.
Out of Scope Changes check ✅ Passed All changes align with #369 objectives: appium/driver updates, dependency cleanup, workflow adjustment for Node versions, and Appium readiness check update.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch copilot/update-to-appium-v3-1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI and others added 2 commits November 4, 2025 19:52
Co-authored-by: hawkeyexl <5209367+hawkeyexl@users.noreply.github.com>
Co-authored-by: hawkeyexl <5209367+hawkeyexl@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Appium to version 3.1 and related packages Update to Appium v3.1 Nov 4, 2025
Copilot AI requested a review from hawkeyexl November 4, 2025 20:37
@hawkeyexl
Copy link
Contributor

@copilot I'm getting lock file issues when running npm ci. Update the lock file.

…endencies

Co-authored-by: hawkeyexl <5209367+hawkeyexl@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 4, 2025

@copilot I'm getting lock file issues when running npm ci. Update the lock file.

Fixed in 32378ec. The issue was caused by pinned sharp optionalDependencies (v0.33.5) that were out of sync with the sharp@0.34.4 dependency. Removed the pinned versions to let npm manage them automatically. npm ci now works correctly.

@hawkeyexl hawkeyexl marked this pull request as ready for review November 4, 2025 20:59
@hawkeyexl
Copy link
Contributor

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 4, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/tests.js (1)

920-921: Endpoint update correctly aligns with Appium v3.

The change from /sessions to /status is the correct health check endpoint for Appium v3. However, consider validating the response body for more robust readiness checking.

The current implementation only checks HTTP 200 status. While this is generally sufficient, Appium's /status endpoint returns a JSON payload with build information and readiness state that could be validated:

 async function appiumIsReady() {
   let isReady = false;
   while (!isReady) {
     await new Promise((resolve) => setTimeout(resolve, 1000));
     try {
       let resp = await axios.get("http://0.0.0.0:4723/status");
-      if (resp.status === 200) isReady = true;
+      if (resp.status === 200 && resp.data?.value?.ready !== false) isReady = true;
     } catch {}
   }
   return isReady;
 }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8ac7bbf and 1c34e0b.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • reference.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • .github/workflows/npm-test.yaml (0 hunks)
  • package.json (2 hunks)
  • src/tests.js (2 hunks)
💤 Files with no reviewable changes (1)
  • .github/workflows/npm-test.yaml
🧰 Additional context used
📓 Path-based instructions (2)
src/tests.js

📄 CodeRabbit inference engine (AGENTS.md)

src/tests.js: Register new browser-required actions by adding the handler to the driverActions array in src/tests.js
Add a case for each new action in the runStep() switch statement
Always handle driver lifecycle cleanup in try/finally blocks around driver/session usage
Contexts run serially and steps within a context must stop (skip remaining) after the first failure using a stepExecutionFailed flag
Enforce that driver-based steps only run when Appium is running; use an appiumRequired flag to auto-start/check as needed
Default Appium/WebDriver newCommandTimeout to 600 seconds for all drivers

Files:

  • src/tests.js
src/**/*.js

📄 CodeRabbit inference engine (AGENTS.md)

Use log(config, level, message) for logging and always pass the config object as the first parameter

Files:

  • src/tests.js
🧠 Learnings (7)
📓 Common learnings
Learnt from: CR
Repo: doc-detective/core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-25T03:37:38.480Z
Learning: Applies to src/tests.js : Enforce that driver-based steps only run when Appium is running; use an appiumRequired flag to auto-start/check as needed
📚 Learning: 2025-10-25T03:37:38.480Z
Learnt from: CR
Repo: doc-detective/core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-25T03:37:38.480Z
Learning: Applies to src/tests.js : Enforce that driver-based steps only run when Appium is running; use an appiumRequired flag to auto-start/check as needed

Applied to files:

  • src/tests.js
📚 Learning: 2025-10-25T03:37:38.480Z
Learnt from: CR
Repo: doc-detective/core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-25T03:37:38.480Z
Learning: Applies to src/tests.js : Default Appium/WebDriver newCommandTimeout to 600 seconds for all drivers

Applied to files:

  • src/tests.js
📚 Learning: 2025-10-25T03:37:38.480Z
Learnt from: CR
Repo: doc-detective/core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-25T03:37:38.480Z
Learning: Applies to src/tests/[[:alpha:]!@#$%^&()_+,. -]*.js : Honor file overwrite modes: "false" (never), "true" (always), and "aboveVariation" (only if content differs more than maxVariation, where maxVariation is a decimal like 0.1 but comparisons use percent)

Applied to files:

  • src/tests.js
📚 Learning: 2025-10-25T03:37:38.480Z
Learnt from: CR
Repo: doc-detective/core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-25T03:37:38.480Z
Learning: Applies to src/tests/[[:alpha:]!@#$%^&()_+,. -]*.js : For viewport sizing steps, use setViewportSize() to adjust inner dimensions by calculating window chrome delta

Applied to files:

  • src/tests.js
📚 Learning: 2025-10-25T03:37:38.480Z
Learnt from: CR
Repo: doc-detective/core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-25T03:37:38.480Z
Learning: Applies to src/tests.js : Register new browser-required actions by adding the handler to the driverActions array in src/tests.js

Applied to files:

  • src/tests.js
📚 Learning: 2025-10-25T03:37:38.480Z
Learnt from: CR
Repo: doc-detective/core PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-10-25T03:37:38.480Z
Learning: Applies to scripts/postinstall.js : Post-install must download Chrome/Firefox/ChromeDriver to browser-snapshots/ using puppeteer/browsers and match the host platform

Applied to files:

  • package.json
🔇 Additional comments (2)
package.json (2)

34-42: Coordinated Appium v3 migration looks good.

The major version updates for the entire Appium ecosystem are well-coordinated and align with the PR objectives. The combination of Appium 3.1.0 with compatible driver versions (chromium-driver 2.0.2, geckodriver 2.0.6, safari-driver 4.0.1) follows the migration plan.


62-64: Sharp override correctly resolves dependency conflicts.

The addition of the sharp override with "$sharp" properly addresses the version conflict mentioned in the PR description. This ensures all sharp dependencies use the version specified in the main dependencies (^0.34.4) rather than conflicting optional dependencies.

@hawkeyexl hawkeyexl merged commit 9f6bde1 into main Nov 4, 2025
16 checks passed
@hawkeyexl hawkeyexl deleted the copilot/update-to-appium-v3-1 branch November 4, 2025 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update to Appium v3.1

2 participants

Comments