Ok,
For every editbox class just define html tag as "INPPUT", in this case there are 2 edit box available on the web page so you need to include webedit class and html tag as "INPUT".
Following is what you need to write.
'This code will input Demo in username and password fields.
'Verify whether the object exist or not, put else condition if it does not.
'I hope this clears your query.
Hope this will answer your query
For every editbox class just define html tag as "INPPUT", in this case there are 2 edit box available on the web page so you need to include webedit class and html tag as "INPUT".
Following is what you need to write.
Code:
Dim sOpenUrl
str="Demo"
sOpenUrl = "http://newtours.demoaut.com/"
invokeURL(sOpenUrl)
Set objDescriptive = Description.Create()
'This code will input Demo in username and password fields.
Code:
objDescriptive("html tag").value="INPUT"
objDescriptive("micclass").value="WebEdit"
Set userNameObject = Browser("title:=Welcome:.*").Page("title:=Welcome: .*").ChildObjects(objDescriptive)
'Verify whether the object exist or not, put else condition if it does not.
Code:
If userNameObject.Count <>0 Then
For i =0 to userNameObject.count -1
userNameObject(i).Set str
Next
End If
Code:
Function invokeURL(sUrl )
Dim objIE
Dim objOpenIE
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Visible = True
objIE.Navigate sURL
End Function
Hope this will answer your query