Currently I am passing appium server arguments like below
desired_caps = dict()
desired_caps['platformName'] = 'iOS'
desired_caps['platformVersion'] = '9.1'
desired_caps['deviceName'] = 'iPhone Simulator'
desired_caps['app'] = os.path.abspath('/Users/test.app')
self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
And then I run appium through terminal as appium
But how can I add other server arguments. e.g.
desired_caps['full-reset'] = True
desired_caps['command-timeout'] = '5m'
If I add above part it doesn’t set those parameters. So I have to run like
appium --full-reset --command-timeout 300
afwang
October 27, 2015, 6:22pm
2
The equivalent arguments that you pass in through DesiredCapabilities objects are in camelCase. Try using “fullReset” and “commandTimeout” (or “newCommandTimeout”).
Try seeing if there are constants defined for the capabilities you are specifying. That would probably take some of these hard-coded magic strings out of your test code.
wreed
October 27, 2015, 7:34pm
3
You can see all of the capabilities listed here:
## Appium Desired Capabilities
Desired Capabilities are keys and values encoded in a JSON object, sent by
Appium clients to the server when a new automation session is requested. They
tell the Appium drivers all kinds of important things about how you want your
test to work. Each Appium client builds capabilities in a way specific to the
client's language, but at the end of the day, they are sent over to Appium as
JSON objects.
Some important capabilities are demonstrated in the following example:
```json
{
"platformName": "iOS",
"platformVersion": "11.0",
"deviceName": "iPhone 7",
"automationName": "XCUITest",
"app": "/path/to/my.app"
}
```
This file has been truncated. show original