Forum Discussion
Dmitry_Nikolaev
15 years agoStaff
Hi Sri,
I am getting error in the statemnet Set MyCellContent = MyCell.WndCaption saying needs object string("DisplaySSRSReport")
This is expected - you assign a value to the MyCellContent variable incorrectly. In VBScript, the 'Set' statement is used to assign an object reference to a variable. You mustn't use this statement in your case, as 'MyCell.WndCaption' returns a string. See VBScript's reference for more information.
Can anybody suggest how do i use it.
I recommend that you use the 'Create Property Checkpoint' wizard to check the WndCaption property value of the needed object. See the 'Create Property Checkpoint Wizard' help topic for more information. After you follow the wizard's steps, TC will generate the appropriate code. It will look as follows:
According to your script, I guess <obj> will be the 'Aliases.AcroRd32.wndAcrobatSDIWindow' object. Use the generated code in your SSRSReportTime routine so that it looks as follows:Sub SSRSReportTime
Set StopWatchObj = HISUtils.StopWatch
dim MyCell
StopWatchObj.Start
Set MyCell = Aliases.AcroRd32.wndAcrobatSDIWindow
If (aqObject.CompareProperty(MyCell.WndCaption, cmpContains, "DisplaySSRSReport", False)) Then
StopWatchObj.Stop
Log.Message(" SSRS Report appears for Galen School Of Nursing. Execution time: " & StopWatchObj.ToString & ". Baseline Date: 06-29-2010, Baseline Execution time: 00:00:8.406")
Else
Log.Message("SSRS Report not Loaded.")
End If
End Sub
Related Content
- 2 years ago
- 8 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago