Re: [wtr-general] Can't find an element in a page with javascript:gotolink
Thanks everyone for your assistance. I managed to get it working with Zeljko's suggestions. It turns out the page eppears to be closing the main frame and opening another as a different name so I had to direct Watir to the new frame. xpath does look very interesting and I'll keep it in mind for future projects as well as test it against this one when the heat is off. It will probably make future projects a lot simpler. Mike. Quoting Dave McNulla : mss, from your attachment, I was able to find the link with xpath: browser.link(:xpath, "//a[contains(@href , 'showDownloadLanding.do')]").click Here's a tutorial on it: http://angrez.blogspot.com/2006/06/xpath-and-watir.html Good Luck, Dave -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Can't find an element in a page with javascript:gotolink
mss, from your attachment, I was able to find the link with xpath: browser.link(:xpath, "//a[contains(@href , 'showDownloadLanding.do')]").click Here's a tutorial on it: http://angrez.blogspot.com/2006/06/xpath-and-watir.html Good Luck, Dave -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Can't find an element in a page with javascript:gotolink
On Mon, Feb 28, 2011 at 10:55 PM, Michael Sillers wrote: > download ebill Are you using Opera Dragonfly to inspect the page? (on my machine: view > developer tools > opera dragonfly) > The link doesn't show up when I ask Watir to show links and only sees a single frame. Something like this should work (not tested): browser.frame(how, what).link(:href => "javascript:gotolink('showDownloadLanding.do')").click or browser.frame(how, what).link(:text => " download ebill ").click More on frames: http://wiki.openqa.org/display/WTR/Frames Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them viaqa.mobi conference on software testing - organizer -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Can't find an element in a page with javascript:gotolink
Quoting Željko Filipin : On Mon, Feb 28, 2011 at 10:29 PM, mss wrote: What I'm looking for is an element with the text " download e.bill " (yes, there is a space before the d and after the l although I've tried it in every permutation) or an href "javascript:gotolink('showDownloadLanding.do". Please share link HTML (assuming you want to click it). Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them viaqa.mobi conference on software testing - organizer Here's what opera tells me the link is: download ebill I'd send a link to the page but it's a secure login with our account info which wouldn't go over well. The link doesn't show up when I ask Watir to show links and only sees a single frame. I've tried to click on it by using href and text but neither finds the element. I have been able to click using href on another similar Telus page but not here. Mike -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Can't find an element in a page with javascript:gotolink
On Mon, Feb 28, 2011 at 10:29 PM, mss wrote: > What I'm looking for is an element with the text " download e.bill > " (yes, there is a space before the d and after the l although I've > tried it in every permutation) or an href > "javascript:gotolink('showDownloadLanding.do". Please share link HTML (assuming you want to click it). Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them viaqa.mobi conference on software testing - organizer -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com