Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I am trying to extract text from a webelement but it is generating blank text scenari
#2
Solved: 12 Years, 10 Months, 1 Week ago
Hi Pavan
you need to use variable k in the object created to print all the webelements
Please find the below code

Code:
Set element = description.Create
element("micclass").value = "WebElement"
element("html tag").value = "STRONG"
set contents = browser("name:=Journal of Applied and Natural Science").Page("title:=Journal of Applied and Natural Science").ChildObjects(element)
print contents.count

For k = 0 to contents.count-1


text = contents(k).getroproperty("innertext")
print text
Next

Thanks
-Tanya
Reply


Messages In This Thread
RE: I am trying to extract text from a webelement but it is generating blank text - by tanyamrz - 08-13-2013, 12:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems with Text color recognition Treirk 0 1,428 06-17-2019, 12:19 PM
Last Post: Treirk
  How to remove text in the webedit silpavinod 3 14,562 07-12-2018, 11:08 AM
Last Post: vijaychourasiya0109@gmail.com
  text checkpoint properties error alp 0 1,481 11-24-2017, 04:36 PM
Last Post: alp
  How can we get the Windows application Text box background color Using UFT 11.53 Kuppampattu 3 6,818 06-06-2017, 11:12 AM
Last Post: workrohit08
  How to find and change text in PDF document using QTP UFT automation VBscript alexwhite 0 12,380 02-18-2017, 04:20 AM
Last Post: alexwhite

Forum Jump:


Users browsing this thread: 1 Guest(s)