-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
description
python does not like backslashes since they are used as escape characters. because of this, when I pass arguments to my testing framework (py.test) via the command line (eg. a Windows app path), python is adding an extra backspace to my path (see my python request below). To be clear, this issue is regarding command-line arguments specifically, in python, not a problem with python or in using python as this problem can be solved using the language.
as a result of python adding an extra backslash to the backslashes in my windows path argument passed into the command line, WinAppDriver does not like my path containing double-backslashes and returns the following error to my request:
WinAppDriver error:
{
"status": 13,
"value": {
"error": "unknown error",
"message": "An unknown error occurred in the remote end while processing the command."
}
}
my command line argument passed in to py.test:
'C:\Program Files(x86)\Microsoft Office\root\Office16.exe'
my request sent from py.test to WinAppDriver:
{
"desiredCapabilities": {
"app": "C:\\Program Files(x86)\\Microsoft Office\\root\\Office16.exe",
},
"requiredCapabilities": {}
}
FYI if I send this same request but just remove the backslashes, this error is not encountered although obviously the path to the app is incorrect.
So, my request here is to two-fold:
- allow me to pass Windows paths in 'app' capability for Win32 app paths which contain double-backslashes and treat them as if they contained single backslashes to play nice with cmd-line args in python (and in support of easier CI).
- If you don't want to make this enhancement, at the very least please provide a more detailed/actionable error here when things fail with handling the app path to make troubleshooting issues here much easier.