hi,

   i think the following code will help you. if any go wrong suggest me:
Use Wscript.shell for sending keys


Following is the code:
===============================================
Set echo = CreateObject("Wscript.Shell")
echo.SendKeys"^{ESC}"
wait(2)
echo.SendKeys"{TAB}"
Wait(2)
echo.SendKeys"{DOWN}"
wait(2)
echo.SendKeys"{DOWN}"
wait(2)
echo.SendKeys"{DOWN}"
wait(2)
echo.SendKeys"{DOWN}"
wait(2)
echo.SendKeys"{DOWN}"
Wait(2)
echo.SendKeys"{Enter}"
Wait(2)
echo.SendKeys"+{F10}"
wait(2)
echo.SendKeys"{UP}"
Wait(2)
echo.SendKeys"{ENTER}"
Wait(2)
'The following is for the  TAB - flow in the computer  properties menu
until we select  Device display
For inx = 1 To 7
echo.SendKeys"{TAB}"
wait(2)
If inx = 7 Then
   echo.SendKeys"{Enter}"
   wait(3)
   Exit For
End If
Next
'The following  sendkey{TAB} is used to select the  sys in the Device
display
echo.SendKeys"{TAB}"
wait(2)
'The following  loop code is executed  to select the sub tree menu items in
the SYS root
cnt = 1
Do
echo.SendKeys"{DOWN}"
wait(2)
    cnt = cnt +1
    Select Case cnt
               Case 12  ' The case number is related to sub menu of Netowrk
 adaptor  to know the  details of the Network adaptor
                                 Print  "This series is used to know the
network adaptor"
 wait(2)
                 echo.SendKeys "{RIGHT}"
 'This loop is used to give the details/see  of the sub menu tree under the
root tree menu  -  Network adaptor
                     For indx = 1 TO 4 STEP 1
         echo.SendKeys"{DOWN}"
         wait(2)
 Next
       Case 15  ' The case number is related to sub menu of   System Device
 to know the  details of the sub menu such as port number  etc under the
main root sub menu  System device
                                   Print  " The series is used to know the
port information"
    wait(2)
                    echo.SendKeys"{RIGHT}"
'This loop is used to give the details/see  of the sub menu tree under the
root tree menu  -  System Device
                        For indx = 1 TO 28 Step 1
            echo.SendKeys"{DOWN}"
            wait(2)
  Next
Case  0   Msgbox  "No more information on device manager"
End Select
wait(2)
Loop While cnt <> 16
Wait(2)
Print "end of the program"

'Note :  This program  is work  for window - 7 ultimate & QTP 10.0
'Please change the numbers such as 1, 2, .......15,16,17.....21  as per the
menu items
'Please use the wait  - method  to know the clear flow of the program
execution


Thanks & regards,
S.siva prasad.
==========================================================================================



On Mon, Nov 18, 2013 at 5:28 PM, shilpa gupta <[email protected]>wrote:

>
> Hi All
>
> I want to get the Network Port number displayed on the 'Device Manager'
> dialog using QTP
>
> Steps:
> Go to Start  > Right Click on Computers > Click Properties > Click Device
> Manager
> On the Device Manager dialog, Network Port numbers (for e.g. Port1, Port2
> etc) and NIC (Network Adapter) number is displayed
> I want to get these numbers using QTP
> pls suggest is there ant method available for this
> Regards
>
> --
> --
> 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.
>

-- 
-- 
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