public class JavaScriptError extends Object
FirefoxDriver
(see addExtension(FirefoxProfile)
.Modifier and Type | Method and Description |
---|---|
static void |
addExtension(org.openqa.selenium.firefox.FirefoxProfile ffProfile)
Adds the Firefox extension collecting JS errors to the profile what allows later use of
readErrors(WebDriver) . |
boolean |
equals(Object obj) |
String |
getConsole()
If Firebug is installed and active, this will contain the content of the Firebug Console since the previous
JavaScript errorLogger.
|
String |
getErrorMessage() |
int |
getLineNumber() |
String |
getSourceName() |
int |
hashCode() |
static List<JavaScriptError> |
readErrors(org.openqa.selenium.WebDriver driver)
Gets the collected JavaScript errors that have occurred since last call to this method.
|
String |
toString() |
public String getErrorMessage()
public int getLineNumber()
public String getSourceName()
public String getConsole()
public static List<JavaScriptError> readErrors(org.openqa.selenium.WebDriver driver)
driver
- the driver providing the possibility to retrieved JavaScript errors (see
addExtension(FirefoxProfile)
.public static void addExtension(org.openqa.selenium.firefox.FirefoxProfile ffProfile) throws IOException
readErrors(WebDriver)
.
Example:
final FirefoxProfile profile = new FirefoxProfile();
JavaScriptError.addExtension(profile);
final WebDriver driver = new FirefoxDriver(profile);
ffProfile
- the Firefox profile to which the extension should be added.IOException
- in case of problemCopyright © 2015. All rights reserved.