Quality Testing

Quality is delighting customers

My QTP Automation Script does not recognize Scrool bar.

Hi Friends

I am using QTP 10 . In My application there is scroll bar which is not recognised by QTP.

 

Here are the full details:

I am opening IE7 browser and opening my application which is web based.

I am navigated to a page in application where I have to accept the agreement by clicking "I agree" button. This button is initially "inactive". To activate this button , I  have to scroll down the vertical scroll bar all the way down(that is when the button is activated).and click "I agree" button.

 

Please suggest.

This is the line that my application is generating when I Click on I agree button.

 

Browser("Customize Your Settings").Page("Test Internet Services").Link("I agree").Click "I agree".

 

Thanks

Smitha Reddy

 

Views: 1798

Reply to This

Replies to This Discussion

Try the following steps

> Navigate to I agree page
> Open the Obj Rep
> Add the complete window as an object and select all Active objects option
> See if the scroll bar is recognised.

if not

> try adding only scroll bar as the object by clicking on it.

If your qtp has all the necessary add-ins working fine then you should get the solution using one of the above steps.
Hi Manjunath,

I did fallow your steps and added the complete window as an object but I don’t have an option All active objects and the script is not recording any Scroll bar as the object.
Thanks
Smitha

Hi smitha, send me ur code to my mail, i will check, my mail id is

kanaparthi.vijaykumar@gmail.com

Hi,

You can use analog recording for scrolling down to the page.


Thanks,
Aruna
Hi Aruna , I did try in Analog mode but it did not work. I would like to send you my code.
Could you please give me your email ID?
Thanks
Smitha
Another way is you can write code something like below:

set WshShell = CreateObject("WScript.Shell")
WshShell.AppActivate "Your Title in IE - Microsoft Internet Explorer"
WshShell.SendKeys "{PGDN}" 'press the Page Down key
Set WshShell = nothing
Next


This code will press the Page Down key for you.


Thanks,
Aruna
did you find object properties of "I agree" Link. After finding that, change the value accordingly in given code.
or
and try without "I agree" after .Click
My email id: aruna@ggktech.com
Hi,
I did find a solution to Vertical Scroll bar in QTP
I used
DownKey 50,"Agreement_name"
Public Sub DownKey(numberOfRights,Agreement_name)
Set WS = CreateObject("Wscript.Shell")
Browser("Customize Your Settings").Page("Test Internet Services_3").WebElement(Agreement_name).Click
For i = 1 to numberOfRights
'Browser("Customize Your Settings").Page("Test Internet Services_3").WebElement(Agreement_name).Click
Ws.SendKeys "{PGDN}"
Next
Set WS = Nothing
End Sub
It worked for me too.. Thanks Smitha

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2019   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service