Batch file in Python

Class library usage, coding and language questions.
naga11van
Posts: 2
Joined: Thu Nov 05, 2009 6:40 am
Location: India

Batch file in Python

Post by naga11van » Thu Nov 05, 2009 7:07 am

I want to add more than one recording in an .exe and run specific ones using batch files.This is like running different testcases from a single exe. Is this possible?If you can please reply with an example.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Batch file in Python

Post by Support Team » Thu Nov 05, 2009 9:50 am

Hi naga11van!
Yes, its possible to get command line arguments in IronPython.

sample code:
import Recording1

args = System.Environment.CommandLine
System.Console.WriteLine(args)

if args.Contains("recording1"):
	Recording1.Start()
Best regards,
Christian
Ranorex Support Team

naga11van
Posts: 2
Joined: Thu Nov 05, 2009 6:40 am
Location: India

Re: Batch file in Python

Post by naga11van » Thu Nov 05, 2009 10:08 am

Hi Christian

Thank You so much. It works !