Test Studio Mobile supports coded steps. This allows you to write code and have it executed as a test step. Use a coded step for a scenario that requires more complexity than what can be composed with the Step Builder.
Add a Coded Step from the Step Builder.
Select coding language.
This creates a code-behind file with an empty test method where you can implement your custom code.
In order to execute the code in the test method you should bind it to an existing coded step in the test to which this test class belongs.Double click the coded step in your test in order to access the drop down menu with all valid methods. Select one and save the test.
valid methods are methods of a Public Partial Class that inherits IOSTestBase, AndroidTestBase or WebTestBase depending on the test type you are using.
Here is an example how to use a simple "Tap" command and how to access the recorded elements that belong to the particular test.
All recorded elements are stored in Elements collection.