I am not a JavaScript Guru. Perhaps you could use JavaScript to suppress
that?

For example, Selenium provides a runScript() method which you can call from
DslContext.

void runScript(String script)

Also, Tellurium Engine includes jQuery 1.4.2 that you can exploit, for
instance, the following code

var script=document.createElement('script');
script.type='text/javascript';
script.src=url;

teJQuery("body").append(script);

will create a script tag. For you case, you may need to first remove the
script tag and then add a new one with
the window.print(); line removed. But this does not work if that line runs
during page load. That is to
say, you may have to figure out a way to close the dialog. Selenium provides
couple methods to close
a dialog/window, have you tried them?

Thanks,

Jian
On Fri, Jun 11, 2010 at 2:59 AM, Loo <[email protected]> wrote:

> Hi,
> is it possible to suppress a java script from being called ?
>
> Namely i've got the following script which gets fired up on load
> which i want to avoid :
>
> <script> window.print();</print>
>
> This causes a print dialog to apear which i don't want .
> is there a way to close that dialog , or even better prevent
> the call by intercepting the js code above ?
>
> thanks in advance :) ,
> Loo
>
> --
> 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