Dominicm, This is really cool. I will add this to our user guide.
Thanks for your contribution. Don't forget to follow tellurium on twitter at http://twitter.com/TelluriumSource Thanks, Jian On Tue, Jan 19, 2010 at 12:08 PM, dominicm <[email protected]>wrote: > Hi, > > I had a need recently to debug Tellurium in IE so put together the > following, which should also work for Safari, Opera etc. > > > //Script to add Firebug Lite to a page > String script = "var firebug=document.createElement('script');" + > "firebug.setAttribute('src',' > http://getfirebug.com/releases/lite/1.2/ > firebug-lite-compressed.js')<http://getfirebug.com/releases/lite/1.2/%0Afirebug-lite-compressed.js%27%29>;" > + > "document.body.appendChild(firebug);" + > "(function(){if(window.firebug.version){firebug.init();}else > {setTimeout(arguments.callee);}})();" + > "void(firebug);"; > > //Call addScript Selenium command, which will add a script to the > Selenium runner window. > //This line would be simpler if Tellurium had the addScript method > exposed!! > dslContext.customDirectCall("addScript", new Object[] > {script,"scriptTag"}); > > After the code has run you should see a Firebug Lite window in the > Selenium runner window (I use milti-window mode). From there you can > do the usual debug stuff, such as this, which uses jQuery to find all > parents of an element. > > teJQuery(selenium.browserbot.findElement("your-locator")).parents() > > Works well enough for me - maybe worth adding this to the > documentation? > > -- > You received this message because you are subscribed to the Google Groups > "tellurium-users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<tellurium-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/tellurium-users?hl=en. > > > >--
You received this message because you are subscribed to the Google Groups "tellurium-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/tellurium-users?hl=en.
