Forum Discussion
I have provided an example on how to call a function that resides in another file, using Python.
Make use of this button when inserting code.
In your code, assuming I've indented it correctly,
Line 11,
PyDriverScript.DataSheet(TC_NO_Runorder,ModuleName_runorder,Datasheet_Flag,TestcaseDesr)
Is calling function,
def DataSheet(TC_NO_Runorder,ModuleName_runorder,Datasheet_Flag,TestcaseDesr):
What is line 25 and 26 supposed to be doing?
str = "toSmartBear2.MTE_Textbox_One_level(\"TC_Description_Datasheet\Property_Name\Processname\")"
exec(str)
Thank you for your response.
Sure, to insert the code, I use that option in future.
Yes, that is correct, in the line no 11, if the condition is true then we are calling def DataSheet function.
def RunOrderSheet and DataSheet are available in the PyDriverScript Script unit.
def MTE_Textbox_One_level is available in the PyFn Script unit.
In the line number 25 and 26 we send the parameters to the PyFn Script unit.
As you said, using this exec() function, we are trying to send it to PyFun Script unit, like how we execute in VBScript.
Thanks.
Related Content
Recent Discussions
- 9 hours ago
- 7 days ago
- 10 days ago