Closed testifyqa closed 3 years ago
Language Used: C#
Appium Version: 1.21.0-beta.0
Works driver.ExecuteScript("powerShell", new Dictionary<string, string> {{"command", "echo Hello"}});
driver.ExecuteScript("powerShell", new Dictionary<string, string> {{"command", "echo Hello"}});
Does NOT Work driver.ExecuteScript("powerShell", new Dictionary<string, string> {{"script", "echo Hello\r\n echo World"}});
driver.ExecuteScript("powerShell", new Dictionary<string, string> {{"script", "echo Hello\r\n echo World"}});
Error
OpenQA.Selenium.WebDriverException HResult=0x80131500 Message=An unknown server-side error occurred while processing the command. Original error: Command 'powershell.exe -command 'Set-ExecutionPolicy -Execution-Policy Undefined -Scope CurrentUser'' exited with code 1 Source=WebDriver
This PR will fix it.
Language Used: C#
Appium Version: 1.21.0-beta.0
Works
driver.ExecuteScript("powerShell", new Dictionary<string, string> {{"command", "echo Hello"}});
Does NOT Work
driver.ExecuteScript("powerShell", new Dictionary<string, string> {{"script", "echo Hello\r\n echo World"}});
Error