I have a python script which automates manual steps on SAP GUI client. The script works perfectly fine without any errors. How can i run this script directly from Robotframework. Details: Script path: 'fakepath\testscript.py' Script doesnt generates any output or doesnt returns any variable or object.
-
2i even tried creating a library and then using functions in python script as keyword in robotframework test case but attribute of SAP GUI session (.findById) is not being recognized when i try to call from robotframework.ankit29882– ankit298822018-08-16 08:56:37 +00:00Commented Aug 16, 2018 at 8:56
-
is the answer in stackoverflow.com/questions/36690705/… helpful?Ghasem Naddaf– Ghasem Naddaf2018-08-16 09:12:07 +00:00Commented Aug 16, 2018 at 9:12
-
@ Ghasem Naddaf: I tried the way mentioned in your referred thread but it didnt work for me. Those python script have some standard output or they return some object/variable which will be saved in a result variable. When i remove the 'should be equal to' line, my robotframework test case passes but actually nothing happens.I dont see any SAP GUi session windowankit29882– ankit298822018-08-16 09:47:20 +00:00Commented Aug 16, 2018 at 9:47
-
So make the script return a value.Psytho– Psytho2018-08-16 14:11:29 +00:00Commented Aug 16, 2018 at 14:11
-
@ankit29882 can you update the question with the contents of your script?Ghasem Naddaf– Ghasem Naddaf2018-08-16 19:18:31 +00:00Commented Aug 16, 2018 at 19:18
|
Show 4 more comments
1 Answer
http://robotframework.org/robotframework/latest/libraries/Process.html#Run%20Process
This is the standard keyword for running scripts; does this work?
2 Comments
ankit29882
i tried this but somehow nothing happens. I cant see launch of SAP session window or any associated actions being performed.
Daniel Paczuski Bak
Can you please post your robot script, and the way you run the .py script from the command line?