04-13-2009, 08:27 AM
Hi,
Well first of all i would like to thank to learnQTP I am new to QTP and learning from this site only. Got enough materials and especially good tips from the forum.
I have written the following code:
When i executed .. i am getting following error:
Object doesn't support this property or method: 'userNameObject(...).Set'
Line (10): "userNameObject(i).Set "Demo"".
Can any one guide me? Also please suggest whether i have implemented DP concept correctly or not ?
Cheers,
Prasad
Well first of all i would like to thank to learnQTP I am new to QTP and learning from this site only. Got enough materials and especially good tips from the forum.
I have written the following code:
Code:
Dim sOpenUrl
sOpenUrl = "http://newtours.demoaut.com/"
invokeURL(sOpenUrl)
Set objDescriptive = Description.Create()
objDescriptive("name").value = "user.*"
Set userNameObject = Browser("title:=Welcome:.*").Page("title:=Welcome: .*").ChildObjects(objDescriptive)
For i =0 to userNameObject.count -1
userNameObject(i).Set "Demo"
Next
Function invokeURL(sUrl )
Dim objIE
Dim objOpenIE
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = True
objIE.Navigate sURL
End Function
When i executed .. i am getting following error:
Object doesn't support this property or method: 'userNameObject(...).Set'
Line (10): "userNameObject(i).Set "Demo"".
Can any one guide me? Also please suggest whether i have implemented DP concept correctly or not ?
Cheers,
Prasad