Skip to content

fix(webdriver): normalize orientation value to uppercase in setter - #15

Open
Dor-bl wants to merge 1 commit into
masterfrom
fix/normalize-orientation-uppercase
Open

fix(webdriver): normalize orientation value to uppercase in setter#15
Dor-bl wants to merge 1 commit into
masterfrom
fix/normalize-orientation-uppercase

Conversation

@Dor-bl

@Dor-bl Dor-bl commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Description

The docstrings and standard usage examples allow passing lowercase values like driver.orientation = 'landscape'. While the setter validated value.upper() against the allowed values ['LANDSCAPE', 'PORTRAIT'], it previously forwarded the raw value to the Appium server command payload instead of the normalized uppercase string.

This PR normalizes value.upper() in the command payload and adds a unit test verifying case normalization.

Changes

  • In appium/webdriver/webdriver.py: pass value.upper() in Command.SET_SCREEN_ORIENTATION payload.
  • In test/unit/webdriver/webdriver_test.py: add test_orientation_setter_normalizes_case to verify lowercase inputs ('landscape', 'portrait') are sent as uppercase.

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