Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update Python recorder code #1167

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

eglitise
Copy link
Collaborator

@eglitise eglitise commented Nov 2, 2023

This PR updates the recorder-generated code for the Python client:

  • Add missing driver commands (activateApp, terminateApp, sendSMS)
  • Fix executeScript implementation
  • Apply conversion to Python values also for parameters inside arrays and objects
  • Reorder and group driver command implementations
  • Improve formatting for generated code (remove semicolons, add variable assignment where needed)

@eglitise eglitise added enhancement New feature or request fix This resolves a user-facing problem labels Nov 2, 2023
}

codeFor_background (varNameIgnore, varIndexIgnore, timeout) {
return `driver.background_app(${timeout})`;
}

codeFor_activateApp (varNameIgnore, varIndexIgnore, app) {
return `driver.activate_app('${app}')`;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wondered if this command ideally needs to be mobile: command -> https://github.com/appium/appium-uiautomator2-driver?tab=readme-ov-file#mobile-activateapp
but for now, looks good to me. the argument name should be changed for mobile command for android/ios and other drivers

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is fine, because the implementation in the Python client calls mobile: activateApp anyway: https://github.com/appium/python-client/blob/master/appium/webdriver/extensions/applications.py#L187

@eglitise eglitise merged commit 3e73b8a into appium:main Nov 2, 2023
5 checks passed
@eglitise eglitise deleted the update-python-recorder-code branch November 2, 2023 19:51
shiva-guntoju pushed a commit to shiva-guntoju/appium-inspector that referenced this pull request Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fix This resolves a user-facing problem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants