Posts: 10
Threads: 4
Joined: Oct 2012
Reputation:
0
10-13-2012, 06:47 PM
hi, I want to identify a link object whose property values change at runtime.
Below is the link how it looks:
OFS-47013-X:BTFG6412-1
But the above link always starts with OFS. so can u help me with regular expression for the above. I am using descriptive programming in my test.
i have tried the below but its not working
Link("innertext:=OFS.*")
please help me here
Posts: 426
Threads: 4
Joined: Aug 2011
Reputation:
0
10-15-2012, 10:39 AM
Hi,
Are there multiple link with this name format?.If yes, then kindly provide the complete details.
Regards,
Sankalp
Posts: 31
Threads: 0
Joined: Oct 2012
Reputation:
0
10-15-2012, 04:09 PM
(This post was last modified: 10-15-2012, 04:10 PM by harishshenoy.)
Hi if there are more than one link which starts from the 'OFS' then u need to use index of it or try to use any other properties which make the link unique.
u can use link("innertext:=OFS.*" , "index:=0").click
but it is not recommended to use 'index' , try to identify with any of the other properties like 'class' and 'html id'.
Thanks,
Harish
Posts: 10
Threads: 4
Joined: Oct 2012
Reputation:
0
10-16-2012, 12:02 PM
yes it worked now. thanks alot. earlier, it was not clicking any other link as well.
thanks alot for your help.
Posts: 106
Threads: 28
Joined: Jan 2008
Reputation:
0
02-08-2013, 02:01 AM
I am getting error at this line of code.
browser("opentitle:=.*").page("title:=.*).link("href:=www.yahoo.com/account") value after account keep changing, to make it work I need to use regular expression.
I have tried link("href:=www.yahoo.com.*") it throws error. Any suggestion?
Posts: 323
Threads: 8
Joined: Nov 2011
Reputation:
4
02-18-2013, 04:16 PM
you did not use full value of the innertext. Enter the full value of the innertext it will solve your problem