12-01-2010, 10:39 PM
I'm trying to write a script using QTP but got stuck on SetToProperty method.I need to change date in and object innerhtml. After I do that then when I try to set the value Using SetToProperty I'm having error Object required:
For reference here is my code.
Can somebody help me to resolve it?
Many Thanks in Advance.
For reference here is my code.
Code:
Browser("MyPurolator Login - Purolator").Page("MyPurolator Home - Purolator").Link("Create a Shipment").Click
Browser("MyPurolator Login - Purolator").Page("Purolator E-Ship Online").Sync
Set var_date = Browser("MyPurolator Login - Purolator").Page("Purolator E-Ship Online").WebTable("WebTable")
var_date = var_date.GetTOProperty("innerhtml")
MsgBox var_date
var_date = replace(var_date, "2010-12-11 ", "2010-12-02 ")
MsgBox var_date
DataTable.Value("value", dtGlobalSheet) = var_date
var_temp = DataTable.Value("value", dtGlobalSheet)
MsgBox var_temp
var_date.SetTOProperty "innerhtml", var_temp (THIS IS WHERE HAVING ERROR)
' Set value of web table then sync
MsgBox var_date.GetTOProperty("innerhtml")
Browser("MyPurolator Login - Purolator").Page("Purolator E-Ship Online").Sync
Can somebody help me to resolve it?
Many Thanks in Advance.