Example usage for org.openqa.selenium.firefox FirefoxProfile addExtension

List of usage examples for org.openqa.selenium.firefox FirefoxProfile addExtension

Introduction

In this page you can find the example usage for org.openqa.selenium.firefox FirefoxProfile addExtension.

Prototype

public void addExtension(String key, Extension extension) 

Source Link

Usage

From source file:com.cognifide.aet.worker.helpers.JavaScriptError.java

License:Apache License

/**
 * Adds the Firefox extension collecting JS errors to the profile what allows later use of {@link #readErrors(WebDriver)}.
 * <p>/*from www  .j a v  a  2 s  .co m*/
 * Example:<br>
 * <pre><code>
 * final FirefoxProfile profile = new FirefoxProfile();
 * JavaScriptError.addExtension(profile);
 * final WebDriver driver = new FirefoxDriver(profile);
 * </code></pre>
 * @param ffProfile the Firefox profile to which the extension should be added.
 * @throws IOException in case of problem
 */
public static void addExtension(final FirefoxProfile ffProfile) throws IOException {
    ffProfile.addExtension(JavaScriptError.class, "JSErrorCollector.xpi");
}