Skip to content

fix: update executor and driver server URL state on directConnect - #2500

Open
hoanle0126 wants to merge 1 commit into
appium:masterfrom
hoanle0126:fix/direct-connect-server-url-state
Open

hoanle0126 wants to merge 1 commit into
appium:masterfrom
hoanle0126:fix/direct-connect-server-url-state

Conversation

@hoanle0126

Copy link
Copy Markdown
Contributor

Change list

  • Update AppiumCommandExecutor.overrideServerUrl to refresh the stored client configuration and remote server address alongside the HTTP client, and populate the base URL from AppiumDriverLocalService when omitted in the client configuration.
  • Delegate AppiumDriver.getRemoteAddress to the active command executor so callers (including SeleniumBridge and log listeners) observe the updated server URL after directConnect or subsequent URL overrides.
  • Handle bare IPv6 literals, relative paths without a leading slash, blank direct-connect capability strings, and case-insensitive HTTPS protocol matching in DirectConnect.

Types of changes

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Details

After the command executor became standalone in v11, overrideServerUrl created a new HTTP client with the overridden base URL without updating the executor fields. That left getAddressOfRemoteServer(), the driver remote address, and the Selenium bridge client configuration pointing to the initial hub URL after direct connect.

Added unit tests covering executor state updates, Selenium bridge client configuration propagation, local service base URL fallback, and IPv6 / path / blank-capability cases.

This branch has not been deployed

No deployments
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.

1 participant