Ugh
If you are going to only use that script from Robot Framework, then perhaps it would be best to format that script as a library [1]. If you are going to run the script also somewhere else than in the Robot Framework, you could use Process [2] library to run it. It is also combine the two options, by example using the hybrid or dynamic library[1] API.
There is many ways to what you want and which way to go depends on your needs.
-Tatu
[1] http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#creating-test-libraries
[2] http://robotframework.org/robotframework/latest/libraries/Process.html
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
Ugh
If you are going to only use that script from Robot Framework, then perhaps it would be best to format that script as a library [1]. If you are going to run the script also somewhere else than in the Robot Framework, you could use Process [2] library to run it. It is also combine the two options, by example using the hybrid or dynamic library[1] API.
There is many ways to what you want and which way to go depends on your needs.
-Tatu
[1] http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#creating-test-libraries
[2] http://robotframework.org/robotframework/latest/libraries/Process.html
On 18 Apr 2016 13:35, "Ellendula Sainath" <ellendul...@gmail.com> wrote:
Hi,--Automated few scripts in python(.py) and i would like to execute the same test case in Robot framework.for example:i have .py script:a,b = 20,20if (a <> b):print "true"else:print "false"Can anyone please guide me the process to execute the above testcase in Robot framework.Regards,Sainath
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
Ugh
If you write it like this:
| ${result} = | Run Process | python | -c E:\Python_practice\Hello.py |
| Should Be Equal | ${result.stdout} | Hello python! |
does it then work?
-Tatu
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
Starting test: Test1 A.Sample test case
20160420 12:48:28.603 : INFO :
Starting process:
['python', '-c', 'C:Python27LibHello.py']
20160420 12:48:28.634 : INFO : Waiting for process to complete.
20160420 12:48:28.946 : INFO : Process completed.
20160420 12:48:28.946 : INFO : ${result} = <result object with rc 1>
20160420 12:48:28.962 : INFO :
Argument types are:
<type 'unicode'>
<type 'unicode'>
20160420 12:48:28.962 : FAIL : != Hello, world!
Ending test: test1 A.Sample test caseTo unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
class RandomNum(object):
def random_number(self):
num = random.randrange(1, 100000, 1)
num = str(num)
print num
firstname = "Test" + num + ""
lastname = "Automation" + num + ""
email = "" + firstname + "." + lastname + "@xyz.com"
I want to use the firstname, lastname and email generated here, in one of my robot test case file. How can I achieve that?
Thanks!
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframework-users@googlegroups.com.