Micro Focus QTP (UFT) Forums
LInk reg expression - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Regular Expressions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Regular-Expressions)
+--- Thread: LInk reg expression (/Thread-LInk-reg-expression)



LInk reg expression - QAVA - 11-02-2012

Hi,

I have a qtp statement:

Code:
Browser("browser").Page("page").Link("Page (6)").Check CheckPoint("Page (6)")

how do i parameratize page (6).

i went to <<link removed>> OR, change to Page \(0-10\)

then i went to check point OR, change to Page \(0-10\)
but it still does not work.

Please advise.

Actually it works if i write as Page \([\d]\).

it does not work, number is more than 9.

that means if i have page(9) it works.
if i have page(200), it does not work.

Pls advise.


RE: LInk reg expression - Ankesh - 11-08-2012

write it like

Page\([0-9]+\)

Regards,
Ankesh


RE: LInk reg expression - newqtp - 02-08-2013

I have below code..its not giving any error it just goes through and doesn't click register link. what am I doing wrong? Please help

Code:
if Browser("openurl:=.*").Page("url:=http://www.yahoo.com.*").link("href:= http://www.yahoo.com.*","name:=register").Exist then
   Browser("openurl:=.*").Page("url:=http://www.yahoo.com.*").link("href:= http://www.yahoo.com.*","name:=register").Click
end if
Also Tried
if Browser("openurl:=.*").Page("url:=.*").link("html tag:=A", "name:=register", "href:= http://www.yahoo.com.*").exist then
   Browser("openurl:=.*").Page("url:=.*").link("html tag:=A", "name:=register", "href:= http://www.yahoo.com.*").click
end if

No luck with both..


RE: LInk reg expression - Ankesh - 02-14-2013

Probably it is not finding the object. First highlight the object and then click on it.
you may use the title property for browser and page objects.

Regards,
Ankesh