Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP Not accepting method directly
#1
Not Solved Exclamation 
I'm trying to do a keyword driven framework and the Function where I call the different actions has different Case depending on the action I want to perform. What I have to do to eliminate the Execute Command?

The control_object variable has the the hierarchy similar or equal to (Browser(arrParentProp(0)).Page(arrParentProp(1)).Frame(arrParentProp(2)).WebButton(arrParentProp(3))

Why QTP is not only accepting ->->-> control_object.click
here is part of my code;
If you want to see all the function library see the attachment please.

Code:
            Case "Click_Link"
                sExec = control_object & ".click"                                                
                Execute (sExec)
                
            Case "Click_WebButton"                                                            
                sExec = control_object & ".click"
                Execute (sExec)

'Same thing happen with every case, for example *****
Case "Run"
                    sExec = "systemutil.Run" & sDataValue
                Execute (sExec)
                Browser("Main").Page("Main").Sync
                Browser("Main").Page("Main").WebList("Environment").Select "System Integration (UAT)"


Thanks,
Daniel Laureano
a Friend from Puerto Rico.


Attached Files
.txt   Function Library.txt (Size: 11.41 KB / Downloads: 96)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Can we save an exported Excel sheet directly from QTP? Akhila 2 3,491 11-28-2013, 10:30 AM
Last Post: Akhila
At Post results directly to QC QTPScripter 0 2,101 02-16-2012, 02:23 PM
Last Post: QTPScripter

Forum Jump:


Users browsing this thread: 1 Guest(s)