Closed testifyqa closed 3 years ago
This is fixed in appium@beta
Awesome thanks, didn’t realise, will switch to beta for now. Thanks for the fast reply :)
Ok so I just tried appium@beta but am now getting this error -> Error: Potentially insecure feature 'undefined' has not been enabled. If you want to enable this feature and accept the security ramifications
Am trying with 'prerun' desired capability
Appium Server started with >appium --allow-insecure=power_shell --nodeconfig=local-nodeconfig.json
Just checked it via driver.ExecuteScript() however and that worked successfully :)
I thought my follow-up question fits well here.
I'd like to run a powershell script as "prerun", as described here: https://github.com/appium/appium-windows-driver#power-shell-commands-execution
so I've added this line of code:
this.options.AddAdditionalCapability("prerun", "C:\\cygwin64\\bin\\bash --login -i C:\\[..path..]\\test.bash");
As far as I can tell, nothing happens. And I don't even get some message/exception whether it works or not. But I've read, that I need to allow this, as this threas shows... But how do I allow this here?
I instantiate the options like this.
protected AppiumOptions options = new AppiumOptions();
But I nowhere found how to do this here: --allow-insecure=power_shell
Here is a Link to the "Appium Security document", but this doesn't work. Hence, I am a bit clueless...
Thanks to someone in advance, who can help me.
this.options.AddAdditionalCapability("prerun", "C:\cygwin64\bin\bash --login -i C:\[..path..]\test.bash");
this does not look like a valid powershell script
But I nowhere found how to do this here: --allow-insecure=power_shell
This is a server command line argument. It must be provided to the server startup command line
Thanks for your response.
Why doesn't it look like a valid powershell script? If I can run this command in Windows PowerShell, this should work, shouldn't it? If it is invalid, why don't I get some feedback? The application just seems to ignore it....
What server? We are running WinAppDriver this way in our Application:
winAppDriver = Process.Start(new ProcessStartInfo(AppSettings.winAppPath_64, String.Format("{0} {1}", AppSettings.winAppHost, AppSettings.winAppPort)) { UseShellExecute = false, RedirectStandardInput = false/*, RedirectStandardOutput = true*/ });
How to set this allow-insecure here?
What server? We are running WinAppDriver this way in our Application:
This feature is specific to appium-windows-driver. If you use WAD separately (e.g. not as a part of Appium ecosystem) then please do not report issues here as the server part is maintained by Microsoft.
Language used = C#
STEPS TO REPRODUCE
appium --allow-insecure=power_shell
driver.ExecuteScript("powerShell", new Dictionary<string, string>{{"command", "echo \"Hello World!\""}});
ACTUAL RESULTS Error is thrown stating Error: Power Shell script/command must not be empty
EXPECTED RESULTS Powershell command is executed successfully