hi i have one issue while automating the script using QTP i
want scrool down .i cannot do even using scrool down
methqad is not working .the object will take WebElement plz
is there any code help me

Answers were Sorted based on User's Feedback



hi i have one issue while automating the script using QTP i want scrool down .i cannot do even us..

Answer / balaji

hi rico thanks for Suggestion i will try using washell but
if i recording also it wont identify the objects .


thank you
balaji

Is This Answer Correct ?    1 Yes 0 No

hi i have one issue while automating the script using QTP i want scrool down .i cannot do even us..

Answer / mohd ikhlaque

HI

I have tried the Mouse wheel UP/Down movement operation for
a Windows application , and it is working pretty fine.

Please find the code-snipt for the above mentioned
operation.


'*********************************************************
Function To Perform Mouse Scroll Wheel Operation
****************************************************
*******************
'Function Name :
MouseWheelRotation(iClicks)

'Description :
Performs Mouse Scroll Wheel Operation

''Parameters :
1.iClicks :: No. of Mouse Click
'

'Return Value :
TRUE \ FALSE

'Pre-requisite : Nx
should be launched

'Examples :
Call MouseWheelRotation(-2) -----> To perform
Scroll Down
'
Call
MouseWheelRotation(2) -----> To perform Scroll UP

'History :
' Developer Name

Date
Rev. No.

Reviewer
'-----------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
-
' Mohd Ikhlaque

31/05/ 2012
1.0

'-----------------------------------------------------------
------------------------------------------------------------
------------------------------------------------------------
-

'*********************************************************
Start of Function
****************************************************
******************

Public Function MouseWheelRotation(iClicks)
dim iLoop
dim bPos
Window("NXWindow").Window("WinDrawingArea").WinObject
("WinDrawingArea").click 1,1 '======= The Object on which
Mouse wheel operation is to be perform.===========
Wait(2)
MouseWheelRotation=False
Extern.Declare
micVoid, "mouse_event", "user32.dll", "mouse_event",
micLong, micLong, micLong, micLong, micLong
Const MOUSEEVENTF_WHEEL = 2048 '@const long |
MOUSEEVENTF_WHEEL | middle button up
Const POSWHEEL_DELTA = 120 '@const long | POSWHEEL_DELTA |
movement of 1 mousewheel click Down<nl>
Const NEGWHEEL_DELTA = -120 '@const long | NEGWHEEL_DELTA |
movement of 1 mousewheel click Up<nl>

If iClicks<>0Then
For iLoop = 1 to abs(iClicks)
If iClicks > 0 then
'========To Scroll Down=============
Extern.mouse_event
MOUSEEVENTF_WHEEL,0,0,POSWHEEL_DELTA,1
' "Performed Mouse Wheel Down
Operation Successfully "
MouseWheelRotation=True
else
'===========To Scroll
UP===============
Extern.mouse_event
MOUSEEVENTF_WHEEL,0,0,NEGWHEEL_DELTA,1
' "Performed Mouse Wheel UP
Operation Successfully "
MouseWheelRotation=True
end if
next
else
' "Fail :Fail To Perform [Mouse Wheel UP/Down]
Operation"
End If
End Function

Is This Answer Correct ?    0 Yes 0 No

hi i have one issue while automating the script using QTP i want scrool down .i cannot do even us..

Answer / rico

I think this can be done by creating the shell object and
then using the sendkeys option(i'm just guessing)...maybe
the code goes like this

Set myshell = CreateObject("Wscript.Shell")
myshell.sendkeys "down" ' take the cursor down

(WshShell.SendKeys("+{F10}")'simulate a mouse right-click
by sending a shift F10)

Other way of doing this would be " analog recording" where
is caputre the mouse movements(like scroll, click, etc)

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More QTP Interview Questions

in login module login button chage regularly(means login button change to submit button).What is the code for it.

3 Answers  


what is bultin funtaion in QTP &tell me five examples?

5 Answers   Kanbay,


how to explain a claims and insurance project?

0 Answers  


hai friends i already ask this question but when i post the question the alignment goes wrong .....my question is we have a WEB TABLE ....assume that web table having 3 row's and 3 column here in 2nd row 3rd column having VISIT FACEBOOK link...now i want to check the VISIT FACEBOOK link is available or not ..if it's there i want to click the link ...then how to find the web table row or column count ....don't write the excel or data table script here friends .....consider that it's a WEB TABLE do a favour ...thank's

3 Answers  


Can we set a timeout for the msgbox.I want the msgbox to disappear after 2 seconds during the script execution without clicking on the OK button manually.

6 Answers  






What are the option you can use to synchronize your test?

2 Answers  


Hi. I have completed B.TECH(CS) , But I will go to "SECURITY CONSOLE OPERATING" [C.C CAMERA abservation]. IF interviwer asks " Why you choose this job ?" What we will say? urgent.........................urgent...........

0 Answers   IBM,


how to test use the quality control .how to verify the image verification

0 Answers   Wells Fargo,


how qtp will recognise if application is run on many browsers

1 Answers   Cap Gemini,


I opened gmail login into gmail and i have to save (Pass or move) all the mail into notepad please give me code Thanks of all

0 Answers   Wipro,


We have a text file which contains 1 to 100 numeric values sequentially like 1 2 . . 100 Now we have to count them and transfer to XML file by writing a code in qtp.

1 Answers   Cap Gemini,


What is the use of Accessibility check point?

3 Answers  


Categories