For attaching to an existing Firefox instance you can use FireWatir::Firefox.attach() method. But you need to make sure the JSSh is running in the existing instance.
Regarding XPath i'll look into it & get back to you. - Angrez On Fri, Apr 10, 2009 at 8:42 PM, Jeremy Mordkoff <j...@zeevee.com> wrote: > Okay, I answered some of my own questions. I stumbled on the RDOC > browser, found js_eval and I started munging it. > > > > In firebug, I can do > > > > var results = document.evaluate("//*[name()='vgtile' and @label='Hulu']", > document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); > > if (results.snapshotLength >= > 1) > > { > > results.snapshotItem(0).oncommand(); > > } > > console.log("done") > > > > and it works every time. But in firewatir, if I do > > > > xpath="//*[name()='vgtile' and @label='Hulu']" > > query = "browser=window.getBrowser(); document.evaluate(\"#{xpath}\", > document, null, 7, null).snapshotLength;" > > > > ff.js_eval(query) > > > > > > I get zero every time. Any ideas? Is there a jssh forum? > > > > PS. The 7 is the value of XPathResult.ORDERED_NODE_SNAPSHOT_TYPE since > XPathResult does not seem to be defined in jssh. > > > > JLM > > > > Hi all --- no luck on my first issue, so I have taken a different > approach. I have installed firebug and fireunit and I have the basics > working in there. Now I want to move some of this over to firewatir. > > > > Is there a way to see all of the jssh interactions when running a firewatir > script? > > > > Is there a way to send raw javascript commands to jssh (and capture the > output) from a firewatir script? > > > > Is there a way to attach to an existing ff instance, rather than calling > Firefox.new? I still feel like there must be one more doc around that I just > can’t find. Something that lists all of the methods and attributes of the > Firefox class and the supporting classes. Or does ruby have some built in > way to browse them? > > > > JLM > > > > * * > > *Jeremy Mordkoff* > > Director, QA, IT & Release > > *ZeeVee, Inc.* > > One Monarch Drive | Littleton, MA 01460 > > Office: 978.467.1395 x233 | Fax: 978.467.1404 > > Mobile: 978-257-2183 > > *...@zeevee.com * > > *www.zeevee.com * > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---