Disable particular js in java webdriver

24 views
Skip to first unread message

Sujith

unread,
Feb 20, 2017, 4:09:59 PM2/20/17
to seleniu...@googlegroups.com
Hi

I was looking for webdriver code to disable/block particular js while loading webpage. Example , to disable an analytics script / Tealeaf etc..

Thanks

Sujith C S

unread,
Feb 20, 2017, 4:13:04 PM2/20/17
to seleniu...@googlegroups.com
Code in web page is like,

    <script type="text/javascript" src="Content/js/libs/analytics/tealeaf.js"></script>
is there a way to block or disable this ?

Thanks

Andreas Tolfsen

unread,
Feb 23, 2017, 6:31:51 PM2/23/17
to seleniu...@googlegroups.com
Also sprach Sujith C S <sujit...@gmail.com>:

> Code in web page is like,
>
>     <script type="text/javascript"
> src="Content/js/libs/analytics/tealeaf.js"></script>
> is there a way to block or disable this ?

Yes, by editing the document and removing this import.

Reply all
Reply to author
Forward
0 new messages