-
Notifications
You must be signed in to change notification settings - Fork 189
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
fix: Refactor parameter names and update documentation #901
Conversation
Refactored parameter names across multiple interfaces for clarity: - `IPushesFiles.PushFile`: `base64Data` to `stringData` and `file` - `IFindsByFluentSelector.FindElements`: `by` to `selector` - `IInteractsWithApps`: `appPath` to `bundleId` and `appId` - `ITouchAction.LongPress`: `el` to `element` Updated documentation comments for better compatibility: - `INetworkActions.ToggleData`: `<=` to `<=` - Removed empty `<param>` tag in `INetworkActions.SetGsmSignalStrength`
@@ -24,7 +24,7 @@ public interface IPushesFiles : IInteractsWithFiles | |||
/// </summary> | |||
/// <param name="pathOnDevice">Path to file to write data to on remote device</param> | |||
/// <param name="stringData">A string to write to remote device</param> | |||
void PushFile(string pathOnDevice, string base64Data); | |||
void PushFile(string pathOnDevice, string stringData); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused here. Which data type is actually expected by this API? The appium server API does expect a base64-encoded string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is indeed an overload that also accepts base64-encoded string.
/// <summary> | |
/// Saves a string as a file on the remote mobile device. | |
/// </summary> | |
/// <param name="pathOnDevice">Path to file to write data to on remote device</param> | |
/// <param name="stringData">A string to write to remote device</param> | |
void PushFile(string pathOnDevice, string stringData); | |
/// <summary> | |
/// Saves base64 encoded data as a file on the remote mobile device. | |
/// </summary> | |
/// <param name="pathOnDevice">Path to file to write data to on remote device</param> | |
/// <param name="base64Data">Base64 encoded byte array of data to write to remote device</param> | |
void PushFile(string pathOnDevice, byte[] base64Data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wanted to make sure the argument that is actually sent to the server is base64-encoded.
Refactored parameter names across multiple interfaces for clarity:
IPushesFiles.PushFile
:base64Data
tostringData
andfile
IFindsByFluentSelector.FindElements
:by
toselector
IInteractsWithApps
:appPath
tobundleId
andappId
ITouchAction.LongPress
:el
toelement
Updated documentation comments for better compatibility:
INetworkActions.ToggleData
:<=
to<=
<param>
tag inINetworkActions.SetGsmSignalStrength
List of changes
Please provide a briefly described change list that you are going to propose.
Types of changes
What types of changes are you proposing/introducing to the .NET client?
Put an
x
in the boxes that applyDocumentation
This can be done by navigating to the documentation section on http://appium.io selecting the appropriate command/endpoint and clicking the 'Edit this doc' link to update the C# example
Integration tests
Details
Please provide more details about changes if necessary. You can provide code samples showing how they work and possible use cases if there are new features. Also, you can create gists with pasted C# code samples or put them here using markdown.
About markdown please read Mastering markdown and Writing on GitHub