For that we can use UiAutomator2Options class or using DesiredCapabilities class
Steps:
Step1:
Need to set capabilities using the method setCapability () and need to give the values in the key value pair
Ex:
UiAutomator2Options cap = new UiAutomator2...