diff --git a/README.md b/README.md index 4d7b7cf34..ad82917c8 100644 --- a/README.md +++ b/README.md @@ -294,7 +294,49 @@ snapshotMaxDepth | int | The number of maximum depth for the source tree snapsho ## Platform-Specific Extensions -Beside of standard W3C APIs the driver provides the following custom command extensions to execute platform specific scenarios: +Beside of standard W3C APIs the driver provides the below custom command extensions to execute platform specific scenarios. Use the following source code examples in order to invoke them from your client code: + +```java +// Java 11+ +var result = driver.executeScript("mobile: ", Map.of( + "arg1", "value1", + "arg2", "value2" + // you may add more pairs if needed or skip providing the map completely + // if all arguments are defined as optional +)); +``` + +```js +// WebdriverIO +const result = await driver.executeScript('mobile: ', [{ + arg1: "value1", + arg2: "value2", +}]); +``` + +```python +# Python +result = driver.execute_script('mobile: ', { + 'arg1': 'value1', + 'arg2': 'value2', +}) +``` + +```ruby +# Ruby +result = @driver.execute_script 'mobile: ', { + arg1: 'value1', + arg2: 'value2', +} +``` + +```csharp +// Dotnet +object result = driver.ExecuteScript("mobile: ", new Dictionary() { + {"arg1", "value1"}, + {"arg2", "value2"} +}); +``` ### mobile: shell