Page 1 of 1

Run Powershell script in Ranorex Solution?

Posted: Thu Jul 10, 2014 11:30 am
by TestXYZ
Hello, can I call Powershell script "doSomething.ps1" in Ranorex TestSuite? in UserCodeModule or in Recoding as "Run Application"? Many thanks!

Re: Run Powershell script in Ranorex Solution?

Posted: Fri Jul 11, 2014 3:39 pm
by Support Team
Hello TestXYZ,

Yes, you can execute Powershell scripts within a UserCodeModule. Please follow the instructions on how to do so: http://blogs.msdn.com/b/kebab/archive/2 ... rom-c.aspx

Regards,
Robert

Re: Run Powershell script in Ranorex Solution?

Posted: Mon Jul 14, 2014 4:05 pm
by TestXYZ
Hi Robert,
thank you very much for your link. It works fine but write Powershell commands in C# as UserCodeModule - it would not so flexible for any changes in Powershell logic. On the other way I would call PS in Batch file (.cmd) such as

Code: Select all

start /B powershell.exe -file ".\doSomething.ps1"
then put it to action “Run Application” in Ranorex.
However it would be very nice, if “Run Application“ (or "Run Script") supports Call of Powershell directly in the later Ranorex release. :!:
Best wishes

Re: Run Powershell script in Ranorex Solution?

Posted: Fri Jul 18, 2014 12:29 pm
by Support Team
Hello,

You are welcome!

In order to raise and discuss your feature request may I ask you to send it to [email protected]? We want to handle feature request via email in order to avoid misunderstandings.

Thank you in advance.

Regards,
Robert