Package at.willhaben.willtest.config
Class AdBlockerConfigurator
- java.lang.Object
-
- at.willhaben.willtest.config.AdBlockerConfigurator
-
- All Implemented Interfaces:
FirefoxConfigurationParticipant
@Deprecated public class AdBlockerConfigurator extends java.lang.Object implements FirefoxConfigurationParticipant
Deprecated.Activates adblocker for the given firefox profile. Expects, that a adblock.xpi exists in classpath root as resource file. This can be achieved by the following POM snippet for example:<plugin> <groupId>org.codehaus.gmaven</groupId> <artifactId>groovy-maven-plugin</artifactId> <executions> <execution> <id>download-adblocker</id> <phase>generate-test-resources</phase> <goals> <goal>execute</goal> </goals> <configuration> <source><![CDATA[ AntBuilder ant = new AntBuilder(); String fileName = "adblock.xpi"; String adBlockerPath = project.build.testOutputDirectory + File.separator + fileName; File adBlockerFile = new File(adBlockerPath); if ( !adBlockerFile.exists() ) { String adBlockerURL = "https://addons.mozilla.org/firefox/downloads/latest/adblock-plus/addon-1865-latest.xpi"; println("Downloading adblocker firefox plugin from " + adBlockerURL + "..."); ant.mkdir(dir:project.build.testOutputDirectory); ant.get( src:adBlockerURL, dest:adBlockerPath, skipexisting:false ); } ]]></source> </configuration> </execution> </executions> </plugin>
-
-
Constructor Summary
Constructors Constructor Description AdBlockerConfigurator()Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidadjustFirefoxProfile(org.openqa.selenium.firefox.FirefoxProfile firefoxProfile)Deprecated.It can adjust aFirefoxProfile.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface at.willhaben.willtest.config.FirefoxConfigurationParticipant
adjustFirefoxBinary
-
-
-
-
Method Detail
-
adjustFirefoxProfile
public void adjustFirefoxProfile(org.openqa.selenium.firefox.FirefoxProfile firefoxProfile)
Deprecated.Description copied from interface:FirefoxConfigurationParticipantIt can adjust aFirefoxProfile. It can load for example browser plugins.- Specified by:
adjustFirefoxProfilein interfaceFirefoxConfigurationParticipant- Parameters:
firefoxProfile- the profile to be adjusted
-
-