public final class WebDriverDebug extends Object
WebDriver.| Constructor and Description |
|---|
WebDriverDebug(org.openqa.selenium.WebDriver webDriver) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
dumpPageSourceTo(Writer writer)
Writes the source of the last loaded page to the specified writer.
|
boolean |
dumpSourceTo(File dumpFile)
Writes the source of the last loaded page to the specified file.
|
String |
getCurrentUrl()
Get the URL that the underlying web driver is currently at.
|
boolean |
takeScreenshotTo(File destFile)
Saves screen shot of the browser to the specified file.
|
@Inject public WebDriverDebug(@Nonnull org.openqa.selenium.WebDriver webDriver)
@Nonnull public String getCurrentUrl()
public boolean dumpSourceTo(@Nonnull File dumpFile)
dumpPageSourceTo(java.io.Writer)
for details on how it works.
As opposed to dumpPageSourceTo(java.io.Writer), this method makes sure to close the handle used
to write to dumpFile.dumpFile - File to write the source to.public boolean dumpPageSourceTo(@Nonnull Writer writer)
writer.
This method will attempt to not propagate any exceptions that prevent it from completing. Instead, the write will
be aborted, the exception logged and false returned. The only exception raised by this method is
NullPointerException in case writer is null.writer - writer to write the page source toCopyright © 2016 Atlassian. All rights reserved.