How to get the text of webelement which is dynamic and scrolling

3,380 views
Skip to first unread message

Krish

unread,
Jan 11, 2011, 1:34:54 AM1/11/11
to QTP - HP Quick Test Professional - Automated Software Testing
Hi All,

I am trying to fetch the innertext from a web element of web page the
text box is moving (i,e scrolling text)

Adding this object in Object Repository gives the following details:

Class: Web Element
html tag : DIV

Note : This Text keeps on rolling from bottom to top

I wrote the Discriptive program to fetch this inner text but failed:

Set Webel=description.Create()
Webel("Class Name").value="WebElement"
Webel("html tag").value="DIV"
'Get the Name
Innovation_name=Browser("IZone - InnoShow").Page("IZone -
InnoShow").WebElement(Webel).getROProperty("innertext")
msgbox Innovation_name

Searched in Google but dint found the solution...

Kindly help me to get resolve this issue

Thanks in Advance

Regards,
Krish

QTPforall QTPforall

unread,
Jan 11, 2011, 1:38:20 AM1/11/11
to QTP - HP Quick Test Professional - Automated Software Testing
Please find the attachment for the web page
 
The Text marked in Pink coller is what i am trying to fetch
Note : the text (webelement) is scrolling..
 
Regards,
Krish.
Page.JPG

shashank shekhar raj

unread,
Jan 11, 2011, 2:38:00 AM1/11/11
to mercu...@googlegroups.com

Hai krish

there are two methods to do this:-

1. Invoke the SMART IDENTIFICATION mechanism then QTP automatically recognize it

or

2. Use Regular Expression Technique which match the string corresponding to other strings

--
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 Mercu...@googlegroups.com
To unsubscribe from this group, send email to
MercuryQTP+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

QTPforall QTPforall

unread,
Jan 11, 2011, 3:23:01 AM1/11/11
to mercu...@googlegroups.com
Hi shashank,
 
I have tried both the option but this din't helped to solve the issue
 
Highliting once again that the webelement is Moving object (Scrolling from bottom to top) within that box
 
 
your help is highly appreciated.
 
Regards,
Krish

shashank shekhar raj

unread,
Jan 12, 2011, 1:22:51 AM1/12/11
to mercu...@googlegroups.com
Hai Buddy

First of all use descriptive programming only in those lines where you put the scripts of these dynamic objects if you used shared object properties then open smart identification and play with smart identification  and read this topic .

I'm sure you will got the solution

If QuickTest is unable to find any object that matches the

recorded object description, or if it finds more than one

object that fits the description, then QuickTest ignores

the recorded description, and uses the Smart Identification

mechanism to try to identify the object.

While the Smart Identification mechanism is more complex,

it is more flexible, and thus, if configured logically, a

Smart Identification definition can probably help QuickTest

identify an object, if it is present, even when the

recorded description fails.

The Smart Identification mechanism uses two types of

properties:

Base filter properties?The most fundamental properties of a

particular test object class; those whose values cannot be

changed without changing the essence of the original

object. For example, if a Web link's tag was changed from

to any other value, you could no longer call it the same

object. Optional filter properties?Other properties that

can help identify objects of a particular class as they are

unlikely to change on a regular basis, but which can be

ignored if they are no longer applicable.
Reply all
Reply to author
Forward
0 new messages