Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem in identifying link
#1
[/i]Hi,
I have 2 Links with process and processcomments
i have used the below code for identifying processcomments
Code:
Set WbLink = Description.Create() WbLink("micclass").Value = "Link" WbLink("name").Value = "C" WbLink("href").Value=".*processComments.*" Set AllWbLink = Browser("micclass:=browser").Page("micclass:=Page").ChildObjects(WbLink) NumberOfLinks=AllWbLink.Count msgbox NumberOfLinks For i=0 to(NumberOfLinks)-1 if AllWbLink(i).GetRoproperty("href")<>"processComments.*" then AllWbLink(i).Click End if Next
Gives the exact result.
But now when i write for edit box:process
Code:
Set WbEdit = Description.Create() WbEdit("micclass").Value = "Link" WbEdit("name").Value = "C" wbEdit("href").Value="process.*" Set AllWbEdit = Browser("micclass:=browser").Page("micclass:=Page").ChildObjects(WbEdit) NumberOfEdits=AllWbEdit.Count msgbox NumberOfEdits For i=0 to(NumberOfEdits)-1 if AllWbEdit(i).GetRoproperty("href")<>"process.*" then AllWbEdit(i).Click End if Next
Now the problem is it matches with that of processcomments and clicks that too.
The href property of process is:javascript:Copy('process','0','2')
while the href property of processcomments is:
javascript:Copy('processComments','0','2')

I want to identify the process link with that of processcomments link
Any help will be really appreciated.
Regards;
Vijay
Reply
#2
try process'.* in second if condition
Reply
#3
Hi Vijay,
always make sure to use proper tags in post to wrap your codes, which makes it in more readable format.
I did it for you this time, hope you will follow this onwards. for more details refer help.

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Problem in identifying the object Paras Singh 3 3,912 04-22-2013, 07:43 AM
Last Post: ravi.gajul
  Problem with Link count mahadevan.swamy1 4 4,371 01-24-2011, 09:01 PM
Last Post: cdesserich
  problem in identifying menubar items in vb application ria 0 2,207 02-18-2010, 10:19 PM
Last Post: ria
  Problem in identifying weblink vijay44 0 1,597 02-09-2010, 09:58 AM
Last Post: vijay44
  Problem in identifying webbutton vijay44 1 2,311 02-08-2010, 02:02 PM
Last Post: satan

Forum Jump:


Users browsing this thread: 1 Guest(s)