Micro Focus QTP (UFT) Forums

Full Version: expected ')' error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,

in my code i have came accross this error

Code:
Browser("df").Page("sd").Link("html tag:=A","text:=(DataTable("what", dtGlobalSheet))","index:=0").Click

expected ')'
Hi,

Try to use below code:
Code:
Browser("df").Page("sd").Link("html tag:=A","text:="&DataTable("what", dtGlobalSheet)).Click

Regards,
Sankalp
thanks the error got solved

but now
Code:
WshShell.SendKeys (DataTable("city", dtGlobalSheet))

this line is not working...... its not taking data from datatable
Sad
Just make sure that page is open where u want to perform this action.

Regards,
Sankalp
Please post the complete code and error u r getting.

Regards,
Sankalp
how to handle this error

The "[ Link ]" object's description matches more than one of the objects currently displayed in your application. Add additional properties to the object description in order to uniquely identify the object.



Thanks
sia

here is my code
Code:
Browser("sd").Page("sd").WebEdit("city").FireEvent "onclick"
Set WshShell = CreateObject("WScript.Shell")
wait (1)
WshShell.SendKeys (DataTable("city", dtGlobalSheet))
wait(1)
Set WshShell = Nothing
wait 4
Browser("sd").Page("sd").Link("html tag:=A","text:="&DataTable("what", dtGlobalSheet)).Click
Hi
Use below:
Code:
Browser("sd").Page("sd").WebEdit("city").SetFocus
instead of
Browser("sd").Page("sd").WebEdit("city").FireEvent "onclick"

For Link related error try to add some other property which will identify the object uniquely.

Regards,
Sankalp
set focus is not working

and for link error
how to add some property which will identify the object uniquely?


Thanks
sia
Share the application url and code..let me try..

Regards,
Sankalp