Micro Focus QTP (UFT) Forums

Full Version: RegularExpression for verifying minimum number
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi I need to verify that a content is displaying in a webpage and details are as below

could be one of two the below links in page
AccountsWeb(15)
AccountsTest(13)

For the above I need to verify two things here.
1. A link is existing with "Accounts.*"
2.Number of results should be minimum 10

So I am assuming for first one it will be
Code:
Browser("xxx").Page("xxx").Link("html tag:=A","text:=Accounts.*")

How do I verify that there are atleast 10 links resulted?
hi,

Try the following to verify number of link displayed

Code:
Set Obj = Description.Create()

Obj("micclass").value = "Link"
Obj("html tag").value = "A"
Obj("innertext").value = "Accounts.*"


set chobj = Browser("name:=xxxx").page("title:=xxx").ChildObjects(Obj)
Based on "chobj.Count" we can decide how many links are displayed with the name starts with "Accounts"

Thanks,
Vijay