Hi,

We added the Firebug Lite as a console logging mechanism for our Tellurium
Engine. Now, you don't even need to call the "addScript" command and use the
console directly to debug. More details on here.

http://code.google.com/p/aost/wiki/Tellurium070Update#Engine_Logging

Thanks,

Jian

On Tue, Jan 19, 2010 at 3:57 PM, Jian Fang <[email protected]> wrote:

> The following two methods have been exposed to DslContext and TestCases as
> well.
>
>  void addScript(String scriptContent, String scriptTagId)
>  void removeScript(String scriptTagId)
>
> Please update the custom selenium server and the core from our Maven repo,
> or directly from,
>
>
> http://maven.kungfuters.org/content/repositories/snapshots/org/telluriumsource/tellurium-core/0.7.0-SNAPSHOT/tellurium-core-0.7.0-20100119.205335-49.jar
>
> For your example, the following test case passed.
>
>     @Test
>     public void testAddRemoveScript(){
>
>         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/firebug-lite-compressed.js%27%29>;"
> +
>        "document.body.appendChild(firebug);" +
>
> "(function(){if(window.firebug.version){firebug.init();}else{setTimeout(arguments.callee);}})();"
> +
>        "void(firebug);";
>         addScript(script, "firebug-litle");
>         pause(500);
>         removeScript("firebug-litle");
>
>     }
>
> 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.

Reply via email to