Hi Team,
I read the test script name to be executed from an excel sheet in a variable and then want to call the same script at runtime. Can you please guide me on how can I achieve this?
Earlier, I used to do it via Eval(str) but seems this is not available in vb.net.
eg:
str = "TestCases.TestCase1()"
Eval(str)
I tried another way to do this as below:
Dim sc As New MSScriptControl.ScriptControlClass()
sc.Language = "VBScript"
Dim str As String = "TestCases.TestCase1()"
sc.Eval (str)
Still, no luck and got the below error:
----
Unexpected exception occured: System.Runtime.InteropServices.COMException (0x800A01A8): Object required: 'TestCases'
at MSScriptControl.ScriptControlClass.Eval(String Expression)
----
What is the easy and best way to address this issue? Please guide.
Thanks.