02-08-2013, 08:44 PM
I'm new to QTP and I'm just trying to click a link in a web page and the "Click" only works if is hard coded. If I try to run [variable].click I receive the following error:
Object required: 'Browser("Main").Page'
Function file: Z:\KDF2\Function Library\FunctionLibrary.vbs
Line [170];"
control_object.click".
Object required: 'Browser("Main").Page'
Function file: Z:\KDF2\Function Library\FunctionLibrary.vbs
Line [170];"
control_object.click".
Code:
Select Case sAction
Case "Click_Link"
' control_object = Browser("Main").Page("Main").Link("Members") '<<--<<-- CONTROL_OBJECT VALUE
'Browser("Main").Page("Main").Link("Members").click '<<--<<-- HARD CODED RAN WITHOUT PROBLEM.
control_object.click