I had seen below code in qtpsudhakars site.

Function SetValueinEditBox(PageObject,EditName,Value2Set)

    Dim EditObjects
    Dim Edit

    set EditObjects=PageObject.getElementsByTagName("INPUT")

    For each Edit in EditObjects

        If lcase(Edit.name)=lcase(EditName) and lcase(Edit.type)="text" then
            Edit.value=Value2Set
            Exit for
        End If

    Next

    Set EditObjects= Nothing
    Set Edit=Nothing

End Function

'***************************************************
'Using above Function without QTP
'***************************************************
'Create Internet Explorer Object
Set IE=CreateObject("internetexplorer.application")
'Make it Visible
IE.Visible=True
'Navigate to a URL
IE.Navigate "http://google.com";

'Get Document Object
Set PageObject=IE.Document

'Set Value in Google Search Edit Box
SetValueinEditBox PageObject,"q","qtp sudhakar"

'***************************************************
'Using above Function in QTP
'***************************************************

'Open internet explorere with specific URL
SystemUtil.Run "iexplore.exe","www.google.com"

'Get DOM Page object using .Object property
set oPageObject=Browser("name:=Google").Page("title:=Google").Object

'Set Value in Google Search Edit Box
SetValueinEditBox PageObject,"q","qtp sudhakar"


On Tue, Nov 26, 2013 at 10:41 AM, rupesh allu <[email protected]> wrote:

> How many ways we can pass value in webedit box other then "SET" ?
>
>
> --
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "QTP - HP Quick Test Professional - Automated Software Testing" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Regards,


Ganesh Muralidharan
'God Never Forgets'

-- 
-- 
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

--- 
You received this message because you are subscribed to the Google Groups "QTP 
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to