Ws/appium service selector performance#14980
Merged
wswebcreation merged 64 commits intomainfrom Feb 10, 2026
Merged
Conversation
create-wdio
eslint-plugin-wdio
@wdio/allure-reporter
@wdio/appium-service
@wdio/browser-runner
@wdio/browserstack-service
@wdio/cli
@wdio/concise-reporter
@wdio/config
@wdio/cucumber-framework
@wdio/dot-reporter
@wdio/firefox-profile-service
@wdio/globals
@wdio/jasmine-framework
@wdio/json-reporter
@wdio/junit-reporter
@wdio/lighthouse-service
@wdio/local-runner
@wdio/logger
@wdio/mocha-framework
@wdio/protocols
@wdio/repl
@wdio/reporter
@wdio/runner
@wdio/sauce-service
@wdio/shared-store-service
@wdio/smoke-test-cjs-service
@wdio/smoke-test-reporter
@wdio/smoke-test-service
@wdio/spec-reporter
@wdio/static-server-service
@wdio/sumologic-reporter
@wdio/testingbot-service
@wdio/types
@wdio/utils
@wdio/webdriver-mock-service
@wdio/xvfb
webdriver
webdriverio
commit: |
dprevost-LMI
reviewed
Jan 3, 2026
packages/wdio-appium-service/src/mobileSelectorPerformanceOptimizer/aggregator.ts
Show resolved
Hide resolved
packages/wdio-appium-service/src/mobileSelectorPerformanceOptimizer/markdown-formatter.ts
Fixed
Show fixed
Hide fixed
Merged
10 tasks
Contributor
|
@wswebcreation Would it not be possible to include a pre-curated You are already doing optimisation, so its a safe guess from me that you "already know" the better selectors of a element, that is why you could determine an "optimal" list of elements EDIT: This may not be this PR's responsibility, as I would image the same process could be used for browser instances as well |
- add more logs for debugging - add logs for the action that is executed - improve element selection
- different logging for silent or else - add indentation to make it "more readable"
- removed element action logic, will implement that later
- add new options called : - enableReporter - reportPath - maxLineLength - throw proper error when the options are not correct/set - removed reporter logic from the service, it's now fully handled by the reporter file itself - properly handle how a reporter should log data - optimize code a bit
- some small refactors
- before and afterCommand will be tested separately
- optimize code a bit
- made usePageSource default
- update docs - update tests
- update docs - update uts
- updated docs - updated tests - small refactor of tests
…ing or encoding Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
ae1be35 to
ef5a135
Compare
…ector-performance
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.
Proposed changes
This pull request introduces Mobile Selector Performance Optimization and tracking features to the
wdio-appium-servicepackage. The changes addThese improvements aim to help users identify and replace slow/brittle iOS locators and selectors in their mobile test suites.
Selector Performance Tracking and Optimization:
mspo-reporter.ts) and shared store (mspo-store.ts) to collect test context and selector performance data, enabling detailed tracking of element-finding times and test context information.optimizer.ts) and command overwrites (overwrite.ts) to automatically find and use optimized selectors (e.g., accessibility id, ios predicate string, class chain) instead of XPath, with performance comparison and fallback to original selectors if needed.Dependency Updates:
@wdio/reporteras a dependency to support the new selector performance reporter.@xmldom/xmldomandxpathfor XML lookupsHow to use
It can be used by adding this to the
wdio-appium-serviceconfigurationThis can result in a CLI-report or a markdown report, see example below. It has been running against the wdio-native-demo-app
Markdown report examples
mobile-selector-performance-optimizer-report-iphone_14-1769276066643.md
mobile-selector-performance-optimizer-report-iphone_simulator-1769276066643.md
TODO:
Types of changes
Checklist
Further comments
Reviewers: @webdriverio/project-committers