Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LInk reg expression
#1
Not Solved
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.
Reply
#2
Not Solved
write it like

Page\([0-9]+\)

Regards,
Ankesh
Reply
#3
Not Solved
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..
Reply
#4
Not Solved
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Dynamic link and Regular expression sudhirzpatil 5 8,781 03-03-2011, 02:16 PM
Last Post: indirani
  var can be used in reg expr ? zhangjiaqiang 0 1,801 06-19-2009, 02:45 PM
Last Post: zhangjiaqiang
  Regular Expression to click an Link ramkumar 1 2,706 07-28-2008, 12:51 PM
Last Post: surya_7mar

Forum Jump:


Users browsing this thread: 1 Guest(s)