How to pass multiple variables to robot.run()

1,489 views
Skip to first unread message

Mohan R

unread,
Aug 1, 2012, 11:33:49 AM8/1/12
to robotframe...@googlegroups.com
I have a test runner script which imports robot and calls robot.run()
It was working fine, until I tried to pass in multiple variables using variable=

robot.run(...,  variable='var1:value1', variable='var2:value2', ...)

I get the following error: SyntaxError: keyword argument repeated

Googling around I guess this error is something new since python 2.6 and it is a python specific error rather than a robot specific one.

Regardless, I would like to know how to pass multiple variables to robot.run()


PS:
* When running directly from the command line, I am able to pass in multiple variables to run.py
* I can run robot only through my test runner due to various needs.

Jussi Malinen

unread,
Aug 2, 2012, 2:10:55 AM8/2/12
to mohanr...@gmail.com, robotframe...@googlegroups.com
Hi!

From running help(robot.run)
....
Options that can be given on the command line multiple times can be
passed as lists like `include=['tag1', 'tag2']`.
...

Regards,
Jussi
> --
> You received this message because you are subscribed to the Google Groups
> "robotframework-users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/robotframework-users/-/j_VNbMkPwUoJ.
> To post to this group, send email to robotframe...@googlegroups.com.
> To unsubscribe from this group, send email to
> robotframework-u...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/robotframework-users?hl=en.



--
Jussi Malinen / Robot Framework
Reaktor, www.reaktor.fi

Mohan R

unread,
Aug 2, 2012, 12:53:03 PM8/2/12
to robotframe...@googlegroups.com, mohanr...@gmail.com
Thank you very much. That worked.
Reply all
Reply to author
Forward
0 new messages