Quality Testing

Quality is delighting customers

Hi

 

         I want to do page down only by clicking on the horizontal scroll present in the page but i am un able to do , even when I try to do using recording , QTP is not generating any corresponding script. 

 

thanks

chandra

Views: 3118

Reply to This

Replies to This Discussion

Hi Chandra

In QTP we use analog recording for this purpose.

Follow the following steps in qtp:
-Open the script
-Open the screen(UI) that has scroll bar
-Now on script page, click on 'Record'
-Click "Analog record' link (Refer attached screenshot)
-Click "Start Analog Record" button
-Go to screen and move the scroll bar
-Stop the script

You will get the following script after recording:
Desktop.RunAnalog "Track1"

Run the script to test and let me know if it works:)

...Anika
Attachments:
Hi Anika

It is working fine , is it possible to go with scripting i.e with out recording , and if i want to click on scroll bar button only for specified times , ex: after 10 clicks I will able to see for what object i search bcz if i keep on clicking i might reach to page last

thanks,
chandra
Thank Anika
Sure, by using co-ordinates.
Follow the below steps :
-Open the script
-Open the screen(UI) that has scroll bar
-Now on script page, click on 'Record'
-Click "Low level recording' link (Refer attached screenshot "Low level recording")
-Go to screen and click on the button of scrollbar (Refer attached screenshot of scroll button)
-Stop the recording.

You will get the following script after recording:

Window("month").WinObject("WindowsForms10.SCROLLBAR.app.0").Click 8,273
(i have applied it on my project for the refrence)

If u want to repeat it for 10 times use for loop (see the code below) and can also use descriptive programming
by using object repository

For i=0 to 10
Window("month").WinObject("WindowsForms10.SCROLLBAR.app.0").Click 8,273
(Use your UI path)
Next

above code click the scroll button for 10 times.

Hope it will help you!
...Anika
Attachments:
Scrolling HTML bookmarks
---------------------
http://www.dynamicdrive.com/dynamicindex5/bookmarkscroll.htm#sectiona

---------------------

i hope to help you :)
Hi You can try these code and find out the exact coordinates you can specify there

Set oDesc1 = Description.Create()
oDesc1("micclass").Value = "WebElement"
Set Lists1 = Browser("Gmail: Email from Google").Page("Inbox (1) - Yahoo! Mail").WebTable("Add a new folder").ChildObjects(oDesc1)
NumberOfLists1 = Lists1.Count()
msgbox NumberOfLists1
For i =251 to NumberOfLists1-1
Lists1(251).Click
Exit for
Next
i need code for how to click on particular mail in outlook mail box .its urjent
Thank You
Balaji
Hi Chandra do you want to click on Horizondal scroll or Vertical Scroll ??

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2022   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service