fix: preserve capability alternatives from option lists - #1296
Conversation
Normalize each Appium options object before Selenium extracts common fields and preserve its W3C capability envelope. Four regressions fail on the base and pass with the fix; 177 unit tests, type/style checks and a real localhost HTTP payload capture passed.
Complete the previously submitted source change with four regressions for common and alternative capabilities, automation overrides, mixed platforms and a single-item list. All 177 unit tests, type/style checks and real localhost HTTP serialization checks passed.
|
Thanks for the approval. I traced the remaining iOS failure on The next test sends an identical session payload, successfully starts WDA, and passes Safari navigation. The job ends with one passed test and one setup error. The simulator had also required two boot retries. The Safari fixture uses a single |
|
yes, that is fine. |
Description
Remote(options=[first, second])is already accepted by the Appium constructor's type signature, but Selenium's generated W3C envelope is wrapped again as anappium:capabilitiescapability. The server receives one emptyfirstMatchentry instead of the requested alternatives.Normalize each option's capability names before Selenium extracts common values, then preserve its
alwaysMatch/firstMatchenvelope. Normalizing first also prevents the defaultautomationNameand an explicitappium:automationNameoverride from ending up in conflicting sections. Caller-owned options, nested capabilities such asproxy, and client connection settings are preserved.Validation
Remote. It confirms the corrected envelope, unchanged input options, and preservation of the suppliedAppiumClientConfigand timeout. This tests request serialization and session-response handling; it does not claim physical-device or multi-driver negotiation.make checkpassed Ruff, formatting, and Mypy over 320 source files.OpenAI Codex performed the implementation and local validation for this GitHub account; maintainer review is pending.
If accepted, please confirm whether this PR qualifies for compensation under the Appium contributor compensation scheme and the applicable amount. I understand that classification and payment remain at the project's discretion.