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
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 |
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 |
what are the Tools for version control?
What is expert view in qtp?
How to make an Action as reusable?
write a script to validate the content in the web application. (do it by OR method) and (do it by Descriptive method by creating a description object.. (give a filter condition only WEbelement- not easy need to use some more property while giving filter condtions- use google for your help...))
How to get Traceability matrix from TD?
I added 5 edit box objects in OR.i run the script and the first edit box successfully executed.But on next day when i executed same script for second edit box,it gives an error "object not Found". But when i used Highlight in app. object already in OR.So how i will handel this type of error. Hi please inform me the write answer.Its urgent.
How many types of OBJECTS are there in QTP?
8 Answers Intel, Inter Globe Technologies,
How to automate a script in mainframes environment? I have the terminal emulator Add in. Describe in detail.
what is the extension of new local object repository?
how do you done Data-driven test using MS-Word Instead of DataTable
WHAT IS PARAMITARIZATION?
Write a Script With descriptive programming(Without Repository) to update an Update an order in Flight App and verify whether it is done successfully.(Use ChildObjects method)