Batch file in Python : Automation API

Batch file in Python

Class library usage, coding and language questions.

Batch file in Python

Postby naga11van » Thu Nov 05, 2009 8: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.
naga11van
 
Posts: 2
Joined: Thu Nov 05, 2009 7:40 am
Location: India

Re: Batch file in Python

Postby Support Team » Thu Nov 05, 2009 10: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
User avatar
Support Team
Site Admin
 
Posts: 1896
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Re: Batch file in Python

Postby naga11van » Thu Nov 05, 2009 11:08 am

Hi Christian

Thank You so much. It works !
naga11van
 
Posts: 2
Joined: Thu Nov 05, 2009 7:40 am
Location: India


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests