public class AdBlockerConfigurator extends Object implements FirefoxConfigurationParticipant
<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 and Description |
|---|
AdBlockerConfigurator() |
| Modifier and Type | Method and Description |
|---|---|
void |
adjustFirefoxProfile(org.openqa.selenium.firefox.FirefoxProfile firefoxProfile)
It can adjust a
FirefoxProfile. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitadjustFirefoxBinarypublic void adjustFirefoxProfile(org.openqa.selenium.firefox.FirefoxProfile firefoxProfile)
FirefoxConfigurationParticipantFirefoxProfile. It can load for example browser plugins.adjustFirefoxProfile in interface FirefoxConfigurationParticipantfirefoxProfile - the profile to be adjustedCopyright © 2018 willhaben internet service GmbH & Co KG. All rights reserved.