Forum Discussion
Your function should be similar to this,
Sub FuncKey(Process_Name, Property_Name, Property_Value, Data)
Dim p, control
Set p = Sys.Process(Process_Name)
If p.Exists Then
Set control = p.Find(Property_Name, Property_Value, 100)
If control.Exists Then
control.Keys(Data)
Log.Message Data
Else
Log.Message "The control was not found."
End If
Else
Log.Error "The process was not found."
End If
End Sub
You need to check if the process and the control exists before performing the key press.
You haven't mentioned what parameters you are passing in
- Arulmurugan2 years agoOccasional Contributor
Hi,
Thanks for the reply.
Please find the parameters below,
Process and controls are available during the key press.
And the given code was worked properly for years.
suddenly we are facing this problem.
Property_Name,Property_Value,Data,ModuleName_Datasheet,TestcaseDesr,Testcaseno,Process_Name,Testlink_Id and Sys.Process(Process_Name) these all parameters are getting value from excelsheet.
values provided in the excel sheet are taken from the respective column;
And the available columns in the excel sheet are, TcNo, ModuleName, TCDescription, Propertyname, Propertyvalue, Data,Processname, Testlinkid
And the row values are, TestCase_179, Help, MTE_Textbox_One_level, NativeClrObject.Name,
MainForm, [F10], MTENZView, 18967.
When running the Testcomlete, at the run time, tool gets the value from the excel.
And we got the respective parameter values. Verified the values by debugging VBScript.
If the above-mentioned details are not ample then please let me know.
Related Content
- 5 years ago
- 6 years ago
- 2 years ago
Recent Discussions
- 10 hours ago