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
#1
Solved: 11 Years, 3 Months, 1 Week ago
click on this link  http://ansfoundation.org/Journals/Volume3Issue1

I am using following code to extract text

Code:
[Set element = description.Create
element("micclass").value = "WebElement"
element("html tag").value = "STRONG"
set contents = browser("title:=.*").Page("title:=.*").ChildObjects(element)
print contents.count

For k = 0 to contents.count-1
text = browser("title:=.*").Page("title:=.*").GetROProperty("innertext")

print text

Next
]
Please help me
Reply
#2
Solved: 11 Years, 3 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
#3
Solved: 11 Years, 3 Months, 1 Week ago
Thanks tanya it works
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problems with Text color recognition Treirk 0 1,098 06-17-2019, 12:19 PM
Last Post: Treirk
  How to remove text in the webedit silpavinod 3 13,761 07-12-2018, 11:08 AM
Last Post: vijaychourasiya0109@gmail.com
  text checkpoint properties error alp 0 1,171 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,006 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,050 02-18-2017, 04:20 AM
Last Post: alexwhite

Forum Jump:


Users browsing this thread: 1 Guest(s)