[Wtr-general] url for link

2007-01-29 Thread Naga Harish Kanegolla
Hi all, Till now I am using ie.link(:url,"http"//www.xyz/abc.html") for a link in watir.Now I have a problem for the ajax link. i.e., the url obtained in the html source is add a term So how could i use this url for the link in watir?? Please tell me the syntax in watir for using such type

Re: [Wtr-general] url for link

2007-01-29 Thread Ryan Doherty
The best way to do this is to completely seperate your markup (html) from your behaviour (js). Your link should actually point to a real URL that works in case someone has JS turned off. This way you can select the link with ie.link(:url, 'linkurl'). If you give the url a unique id or even a

Re: [Wtr-general] url for link

2007-01-30 Thread Nathan Christie
While I do like the answer that RyanD gave that that has not refreshed here yet, you [i]can[/i] access a link element from its "text" property. So with you code: add a term You can access this link in this manner: ie = IE.attach ( :title, "PageTitle" ) myAjaxLink = ie.link( :text, "add a term"

Re: [Wtr-general] url for link

2007-01-30 Thread Bret Pettichord
Naga Harish Kanegolla wrote: > Hi all, >Till now I am using ie.link(:url,"http"//www.xyz/abc.html") for a link in > watir.Now I have a problem for the ajax link. i.e., the url obtained in the > html source is > add a term > > So how could i use this url for the link in watir?? Please tell me

Re: [Wtr-general] url for link

2007-01-30 Thread Naga Harish Kanegolla
Hi, I tried using ie.link(:text,"add a term") but i have "add a term" link more than 10 in the same page. So how could i use that?? - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6325&messageID=17906#17906

Re: [Wtr-general] url for link

2007-01-31 Thread Nathan Christie
I like Bret's idea :) - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6325&messageID=17925#17925 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyf

Re: [Wtr-general] url for link

2007-01-31 Thread Naga Harish Kanegolla
Hi, I got this working by using the index number. ie.link(:index,15).click. Thanks a lot, Harish - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6325&messageID=17989#17989 _

Re: [Wtr-general] url for link

2007-02-01 Thread Željko Filipin
On 1/31/07, Bret Pettichord <[EMAIL PROTECTED]> wrote: ie.link(:html, /contract_id=227/).click Once more, this is so cool. -- Zeljko Filipin zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listin

Re: [Wtr-general] url for link

2007-02-01 Thread Željko Filipin
On 1/30/07, Naga Harish Kanegolla <[EMAIL PROTECTED]> wrote: add a term Can regular expressions be used with xpath? This does not work. ie.link(:xpath, "//[EMAIL PROTECTED]'#{/227/}']/").click Watir::Exception::UnknownObjectException: Unable to locate object, using xpath and //[EMAIL PROTECT

Re: [Wtr-general] url for link

2007-02-01 Thread Prema Arya
Hi, You can't use regular expression in xpath with XPATH 1.0, you can use it in XPATH 2.0 and rexml supports only xpath 1.0. You can use string operations like substring, string before, string after though. http://www.w3.org/TR/xpath#section-String-Functions. Prema On 2/2/07, Željko Filipin <

Re: [Wtr-general] url for link

2007-02-02 Thread Željko Filipin
On 2/2/07, Prema Arya <[EMAIL PROTECTED]> wrote: You can't use regular expression in xpath with XPATH 1.0, you can use it in XPATH 2.0 and rexml supports only xpath 1.0. You can use string operations like substring, string before, string after though. http://www.w3.org/TR/xpath#section-String-F

Re: [Wtr-general] url for link

2007-02-08 Thread Naga Harish Kanegolla
HI , Thank You it worked for that link. But I am having the links of the same kind with same contract_id=227. add a term add a term add a term So for this kind of links what should be done? I am having nearly 15 links of the same text with same type of ajax urls. Please help me for such ki

Re: [Wtr-general] url for link

2007-02-08 Thread Željko Filipin
ie.link(:html, /133/).click or ie.link(:html, /ajax_add_term\/133/).click -- Zeljko Filipin zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] url for link

2007-02-08 Thread Naga Harish Kanegolla
Hi, I tried the two types but its giving error. data_entry.eb.rb:16: syntax error, unexpected tINTEGER, expecting ')' ie.link(:html,/ajax_add_term/131/).click So any other ideas, i tried all the combinations. but its getting error. Please help me. ---

Re: [Wtr-general] url for link

2007-02-08 Thread John Lolis
you missed typed it, type it exactly ie.link(:html, /ajax_add_term\/133/).click I think the \ / is allowing the forward slash to be used as a string and not as a special regex character. - Posted via Jive Forums http://forums.op

Re: [Wtr-general] url for link

2007-02-08 Thread Željko Filipin
This does not work? ie.link(:html, /133/).click -- Zeljko Filipin zeljkofilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] url for link

2007-02-08 Thread Željko Filipin
On 2/8/07, John Lolis <[EMAIL PROTECTED]> wrote: you missed typed it, type it exactly ie.link(:html, /ajax_add_term\/133/).click I think the \ / is allowing the forward slash to be used as a string and not as a special regex character. Exactly. -- Zeljko Filipin zeljkofilipin.com

Re: [Wtr-general] url for link

2007-02-09 Thread Naga Harish Kanegolla
Hi Thanks a lot, It worked. I am using it a lot. But now i got another doubt if the link is of this kind. This is exactly not a link, its a tab link. so how to click such type of links?? and the other typw of link is I used the ie.span(:index,10).click then it worked, but it will be the

Re: [Wtr-general] url for link

2007-02-09 Thread John Lolis
div(:id, "ContractDoc").click i think that should work - Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6325&messageID=18488#18488 ___ Wtr-general mailing list Wtr-

Re: [Wtr-general] url for link

2007-02-12 Thread Naga Harish Kanegolla
Hi Thanks, It didn't gave me any error but It didn't cliked on that. This is exactly my html souce. div id="ContractDoc" dojoType="ContentPane" label="Contract" style="padding: 10px; overflow:auto;" of this kind. This is exactly not a link, its a tab link. so how to click such type of links??