List of usage examples for org.openqa.selenium.firefox FirefoxProfile addExtension
public void addExtension(String key, Extension extension)
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"); }