fix(lambdatest): fix session listing and attach-to-session for LambdaTest (TE-13124)#30
Open
SahilSawLT wants to merge 1357 commits into
Open
fix(lambdatest): fix session listing and attach-to-session for LambdaTest (TE-13124)#30SahilSawLT wants to merge 1357 commits into
SahilSawLT wants to merge 1357 commits into
Conversation
…#2683) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…#2688) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…#2698) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: eglitise <37242620+eglitise@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…um#2701) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: eglitise <37242620+eglitise@users.noreply.github.com>
* test: update getOptimalXpath tests * address copilot comments
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: eglitise <37242620+eglitise@users.noreply.github.com>
…appium#2926) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* refactor: move locator search & Siri imports to header * refactor: split App Source into smaller components
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…appium#2932) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
appium#2933) Bumps the npm_and_yarn group with 1 update in the / directory: [js-yaml](https://github.com/nodeca/js-yaml). Updates `js-yaml` from 4.1.1 to 4.2.0 - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/commits) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 4.2.0 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ppium#2934) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Bumps the npm_and_yarn group with 1 update in the / directory: [undici](https://github.com/nodejs/undici). Updates `undici` from 6.26.0 to 6.27.0 - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](nodejs/undici@v6.26.0...v6.27.0) --- updated-dependencies: - dependency-name: undici dependency-version: 6.27.0 dependency-type: indirect dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: eglitise <37242620+eglitise@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ppium#2947) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
When attaching to an existing session that has a browserName, the inspector navigated the browser to appium.io, discarding the page the user's test was already on. Only navigate when we created the session ourselves; when attaching (attachSessId is set), leave the current page untouched. appMode still switches to WEB_HYBRID in both cases. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Fetch running sessions from both the provider session-list API (derived from the hub host) and the standard /wd/hub/sessions endpoint, then merge the results so app and web sessions both appear when attaching. Failures from either source are tolerated so one unavailable endpoint doesn't hide the sessions returned by the other. Extract the logic into a dedicated fetchTestMuAISessions() helper, mirroring the existing fetchAllSessions() so getRunningSessions stays a thin dispatcher. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…estMu AI mobile:getContexts can drop real webviews (the strict Android parser filters unattached / non-'page' entries) or emit duplicate entries whose IDs the driver won't accept (chrome browser tabs all collapsing to one webview ID), causing "No such context found" on switch. For TestMu AI sessions, use the standard /contexts endpoint as the source of truth for which context IDs exist, enriched with mobile:getContexts metadata (title/url) where IDs match. All other server types keep the existing behavior unchanged. The server type is threaded into InspectorDriver so the branch is scoped to TestMu AI only. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add braces to the single-line if statements flagged by the `curly` ESLint rule (npm run lint). No behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Run `npm run prettier` to satisfy the format check: expand the curly-rule braces in unwrapTestMuAICaps onto their own lines and wrap the attachedSessionCaps ternary. No behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Per maintainer feedback on appium#2892, the mobile:getContexts vs /contexts inconsistency should be fixed in the uiautomator2 driver rather than worked around in the vendor-agnostic Inspector core. Revert the /contexts-authoritative context logic and the serverType plumbing on InspectorDriver. Root cause tracked in appium/appium#22423. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
When attaching to an existing session, sessionCaps never carries browserName, so reading it from driver.capabilities benefits all server types. Drop the TestMu AI gating per review feedback on appium#2892. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes Appium Inspector web browser version support for LambdaTest mobile sessions.
JIRA: TE-13124
Changes
1. Session listing via LTMA API
When the server type is
TESTMUAI, fetch running sessions directly from the LambdaTest Test Management API instead of/wd/hub/sessions. This is needed because/wd/hub/sessionsonly returns App sessions (RD App, VD App) — web sessions (RD Web, VD Web) are not included. The LTMA endpoint returns all 4 mobile surfaces.The LTMA host is derived from the configured hub host:
mobile-hub.lambdatest.com→api.lambdatest.comhub-{cluster}.lambdatestinternal.com→api-{cluster}.lambdatestinternal.commobile-hub-{cluster}.lambdatestinternal.com→api-{cluster}.lambdatestinternal.com2. Capabilities unwrapping for manual session ID entry
When the user manually types a session ID (cache-miss path), MHPS returns nested capabilities:
{"value": {"capabilities": {"desired": {"platformName": "Android"}}, "sessionId": "abc"}}Unwrap after
res.value— matching the existing// adjust for TestMu AI-specific formatpattern already present in the cached sessions path.3.
appModefix for web sessionsAfter attaching to a session,
appMode(NATIVE vs WEB) was alwaysNATIVEbecausesessionCaps.browserNameis empty when the user only provided a session ID. Fixed by usingdriver.capabilities.browserNamefor attached sessions, which is populated from the actual running session after a successful attach.Test plan
🤖 Generated with Claude Code