Run Powershell script in Ranorex Solution?

Ask general questions here.
TestXYZ
Posts: 16
Joined: Thu Aug 29, 2013 12:55 pm

Run Powershell script in Ranorex Solution?

Post by TestXYZ » Thu Jul 10, 2014 11:30 am

Hello, can I call Powershell script "doSomething.ps1" in Ranorex TestSuite? in UserCodeModule or in Recoding as "Run Application"? Many thanks!

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Run Powershell script in Ranorex Solution?

Post by Support Team » Fri Jul 11, 2014 3:39 pm

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
.
Image

TestXYZ
Posts: 16
Joined: Thu Aug 29, 2013 12:55 pm

Re: Run Powershell script in Ranorex Solution?

Post by TestXYZ » Mon Jul 14, 2014 4:05 pm

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Run Powershell script in Ranorex Solution?

Post by Support Team » Fri Jul 18, 2014 12:29 pm

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
.
Image