Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Link object not getting identified
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
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
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,

Are there multiple link with this name format?.If yes, then kindly provide the complete details.

Regards,
Sankalp
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
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
Reply
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,
this is the only link which i will capture, but there are other link as well in that page which starts with some other alphabets or numbers.
Below are the properties of the link object which i am trying to use
Code:
"innertext:=OFS.*",
"html tag:=A",
"color:=#0000ff",
"background color:=#ffffff"

I tried with the above.

below are the other properties available
Code:
[b]text[/b]=OFS-47045-X:BTFG9093-1
innertext=OFS-47045-X:BTFG9093-1
[b]outertext[/b]=OFS-47045-X:BTFG9093-1
[b]name[/b]=OFS-47045-X:BTFG9093-1
[b]innerhtml[/b]=OFS-47045-X:BTFG9093-1
[b]outerhtml[/b]=<A href="/StubEMPUI/BusinessMessageEvent.do?type=detail&amp;msgIndex=0">OFS-47045-X:BTFG9093-1</A>
abs_x=132
abs_y=478

for the first four properties value start with OFS only
i cannot use abs values as they are changing in runtime. please suggest.

below is my code
Code:
Set Mybrowser3=browser("title:=BusinessMessageEvents","name:=BusinessMessageEvents").page("title:=BusinessMessageEvents")
var_ofskeyid=Mybrowser3.Link("innertext:=OFS.*","html tag:=A").GetROProperty("innertext")
Mybrowser3.Link("text:=Notifications","html tag:=A","name:=Notifications").Click

its not working..
Reply
#5
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,

Try to use below code:
Code:
var_ofskeyid=Mybrowser3.Link("name:=OFS.*","html tag:=A").GetROProperty("innertext")

One more thing , do u want to click this link only or some other link because below line of code
Code:
Mybrowser3.Link("text:=Notifications","html tag:=A","name:=Notifications").Click
is clicking something else?
Regards,
Sankalp
Reply
#6
Solved: 11 Years, 3 Months, 3 Weeks ago
yes it worked now. thanks alot. earlier, it was not clicking any other link as well.
thanks alot for your help.
Reply
#7
Solved: 11 Years, 3 Months, 3 Weeks ago
Glad to hear it worked for you. Smile

Regards,
Sankalp
Reply
#8
Solved: 11 Years, 3 Months, 3 Weeks ago
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?
Reply
#9
Solved: 11 Years, 3 Months, 3 Weeks ago
you did not use full value of the innertext. Enter the full value of the innertext it will solve your problem
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  webedit not identified ramya1234 0 2,130 07-26-2016, 10:03 PM
Last Post: ramya1234

Forum Jump:


Users browsing this thread: 1 Guest(s)