Class FirefoxDriver
- java.lang.Object
-
- org.openqa.selenium.remote.RemoteWebDriver
-
- org.openqa.selenium.firefox.FirefoxDriver
-
- io.testproject.sdk.drivers.web.FirefoxDriver
-
- All Implemented Interfaces:
ReportingDriver,org.openqa.selenium.firefox.HasExtensions,org.openqa.selenium.HasCapabilities,org.openqa.selenium.html5.WebStorage,org.openqa.selenium.interactions.HasInputDevices,org.openqa.selenium.interactions.Interactive,org.openqa.selenium.internal.FindsByClassName,org.openqa.selenium.internal.FindsByCssSelector,org.openqa.selenium.internal.FindsById,org.openqa.selenium.internal.FindsByLinkText,org.openqa.selenium.internal.FindsByName,org.openqa.selenium.internal.FindsByTagName,org.openqa.selenium.internal.FindsByXPath,org.openqa.selenium.JavascriptExecutor,org.openqa.selenium.SearchContext,org.openqa.selenium.TakesScreenshot,org.openqa.selenium.WebDriver
public class FirefoxDriver extends org.openqa.selenium.firefox.FirefoxDriver implements ReportingDriver
Extension of the originalFirefoxDriverInstead of initializing a new session, it starts it in the TestProject Agent and then reconnects to it.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openqa.selenium.firefox.FirefoxDriver
org.openqa.selenium.firefox.FirefoxDriver.SystemProperty
-
Nested classes/interfaces inherited from class org.openqa.selenium.remote.RemoteWebDriver
org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions, org.openqa.selenium.remote.RemoteWebDriver.When
-
Nested classes/interfaces inherited from interface org.openqa.selenium.WebDriver
org.openqa.selenium.WebDriver.ImeHandler, org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window
-
-
Field Summary
-
Fields inherited from class org.openqa.selenium.firefox.FirefoxDriver
binary, BINARY, MARIONETTE, PROFILE
-
Fields inherited from interface io.testproject.sdk.drivers.ReportingDriver
LOG
-
-
Constructor Summary
Constructors Constructor Description FirefoxDriver()Initiates a new session with the Agent using default token and URL.FirefoxDriver(ReportType reportType)Initiates a new session with the Agent using default token and URL.FirefoxDriver(java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options)Initiates a new session with the Agent using provided token and default URL.FirefoxDriver(java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options, ReportType reportType)Initiates a new session with the Agent using provided token and default URL.FirefoxDriver(java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName)Initiates a new session with the Agent using provided token and default URL and Project name.FirefoxDriver(java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, ReportType reportType)Initiates a new session with the Agent using provided token and default URL and Project name.FirefoxDriver(java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, java.lang.String jobName)Initiates a new session with the Agent using provided token and default URL, Project and Job names.FirefoxDriver(java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, java.lang.String jobName, ReportType reportType)Initiates a new session with the Agent using provided token and default URL, Project and Job names.FirefoxDriver(java.net.URL remoteAddress, java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options)Initiates a new session with the Agent using provided Agent URL and token.FirefoxDriver(java.net.URL remoteAddress, java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options, ReportType reportType)Initiates a new session with the Agent using provided Agent URL and token.FirefoxDriver(java.net.URL remoteAddress, java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, java.lang.String jobName, boolean disableReports, ReportType reportType)Initiates a new session with the Agent using provided Agent URL, token, Project and Job names.FirefoxDriver(java.net.URL remoteAddress, org.openqa.selenium.firefox.FirefoxOptions options)Initiates a new session with the Agent using provided Agent URL and default token.FirefoxDriver(java.net.URL remoteAddress, org.openqa.selenium.firefox.FirefoxOptions options, ReportType reportType)Initiates a new session with the Agent using provided Agent URL and default token.FirefoxDriver(java.net.URL remoteAddress, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName)Initiates a new session with the Agent using provided Agent URL, default token and Project name.FirefoxDriver(java.net.URL remoteAddress, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, ReportType reportType)Initiates a new session with the Agent using provided Agent URL, default token and Project name.FirefoxDriver(java.net.URL remoteAddress, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, java.lang.String jobName)Initiates a new session with the Agent using provided Agent URL and default token, Project and Job names.FirefoxDriver(java.net.URL remoteAddress, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, java.lang.String jobName, ReportType reportType)Initiates a new session with the Agent using provided Agent URL and default token, Project and Job names.FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options)Initiates a new session with the Agent using default token and URL.FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options, boolean disableReports)Initiates a new session with the Agent using default token and URL.FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options, boolean disableReports, ReportType reportType)Initiates a new session with the Agent using default token and URL.FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options, ReportType reportType)Initiates a new session with the Agent using default token and URL.FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName)Initiates a new session with the Agent using default token and URL with Project name.FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, ReportType reportType)Initiates a new session with the Agent using default token and URL with Project name.FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, java.lang.String jobName)Initiates a new session with the Agent using default token and URL, Project and Job names.FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, java.lang.String jobName, ReportType reportType)Initiates a new session with the Agent using default token and URL, Project and Job names.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidquit()Removes shutdown hook and callsstop().Reporterreport()Provides access to the reporting functionality and settings.protected voidstartSession(org.openqa.selenium.Capabilities capabilities)Sets capabilities and sessionId obtained from the Agent when creating the original session.voidstop()Quits the driver and stops the session with the Agent, cleaning up after itself.-
Methods inherited from class org.openqa.selenium.firefox.FirefoxDriver
getLocalStorage, getSessionStorage, installExtension, setFileDetector, uninstallExtension
-
Methods inherited from class org.openqa.selenium.remote.RemoteWebDriver
builder, close, execute, execute, executeAsyncScript, executeScript, findElement, findElement, findElementByClassName, findElementByCssSelector, findElementById, findElementByLinkText, findElementByName, findElementByPartialLinkText, findElementByTagName, findElementByXPath, findElements, findElements, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByName, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, get, getCapabilities, getCommandExecutor, getCurrentUrl, getElementConverter, getErrorHandler, getExecuteMethod, getFileDetector, getKeyboard, getMouse, getPageSource, getScreenshotAs, getSessionId, getTitle, getWindowHandle, getWindowHandles, log, manage, navigate, perform, resetInputState, setCommandExecutor, setElementConverter, setErrorHandler, setFoundBy, setLogLevel, setSessionId, switchTo, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.testproject.sdk.drivers.ReportingDriver
addons, getReportingCommandExecutor, getScreenshot
-
-
-
-
Constructor Detail
-
FirefoxDriver
public FirefoxDriver() throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using default token and URL.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(ReportType reportType) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionException
Initiates a new session with the Agent using default token and URL.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
- Parameters:
reportType- A type of report to produce - cloud, local or both.- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using default token and URL.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
Creates a new instance based on
capabilities.- Parameters:
options- take a look atFirefoxOptions- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options, ReportType reportType) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using default token and URL.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
Creates a new instance based on
capabilities.- Parameters:
options- take a look atFirefoxOptionsreportType- A type of report to produce - cloud, local or both.- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options, boolean disableReports) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using default token and URL.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
Creates a new instance based on
capabilities.- Parameters:
options- take a look atFirefoxOptionsdisableReports- True to disable automatic reporting of driver commands and tests, otherwise False.- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options, boolean disableReports, ReportType reportType) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using default token and URL.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
Creates a new instance based on
capabilities.- Parameters:
options- take a look atFirefoxOptionsdisableReports- True to disable automatic reporting of driver commands and tests, otherwise False.reportType- A type of report to produce - cloud, local or both.- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using default token and URL with Project name.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
Creates a new instance based on
capabilities.- Parameters:
options- take a look atFirefoxOptionsprojectName- Project name to report- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, ReportType reportType) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using default token and URL with Project name.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
Creates a new instance based on
capabilities.- Parameters:
options- take a look atFirefoxOptionsprojectName- Project name to reportreportType- A type of report to produce - cloud, local or both.- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, java.lang.String jobName) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using default token and URL, Project and Job names.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
Creates a new instance based on
capabilities.- Parameters:
options- take a look atFirefoxOptionsprojectName- Project name to reportjobName- Job name to report- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, java.lang.String jobName, ReportType reportType) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using default token and URL, Project and Job names.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
Creates a new instance based on
capabilities.- Parameters:
options- take a look atFirefoxOptionsprojectName- Project name to reportjobName- Job name to reportreportType- A type of report to produce - cloud, local or both.- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using provided token and default URL.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Creates a new instance based on
capabilities.- Parameters:
token- Development token that should be obtained from SDK pageoptions- take a look atFirefoxOptions- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options, ReportType reportType) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using provided token and default URL.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Creates a new instance based on
capabilities.- Parameters:
token- Development token that should be obtained from SDK pageoptions- take a look atFirefoxOptionsreportType- A type of report to produce - cloud, local or both.- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using provided token and default URL and Project name.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Creates a new instance based on
capabilities.- Parameters:
token- Development token that should be obtained from SDK pageoptions- take a look atFirefoxOptionsprojectName- Project name to report- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, ReportType reportType) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using provided token and default URL and Project name.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Creates a new instance based on
capabilities.- Parameters:
token- Development token that should be obtained from SDK pageoptions- take a look atFirefoxOptionsprojectName- Project name to reportreportType- A type of report to produce - cloud, local or both.- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, java.lang.String jobName) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using provided token and default URL, Project and Job names.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Creates a new instance based on
capabilities.- Parameters:
token- Development token that should be obtained from SDK pageoptions- take a look atFirefoxOptionsprojectName- Project name to reportjobName- Job name to report- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, java.lang.String jobName, ReportType reportType) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using provided token and default URL, Project and Job names.Default Agent URL can be set using TP_AGENT_URL environment variable. If the environment variable is not set, default URL http://localhost:8585 is used.
Creates a new instance based on
capabilities.- Parameters:
token- Development token that should be obtained from SDK pageoptions- take a look atFirefoxOptionsprojectName- Project name to reportjobName- Job name to reportreportType- A type of report to produce - cloud, local or both.- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(java.net.URL remoteAddress, org.openqa.selenium.firefox.FirefoxOptions options) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using provided Agent URL and default token.Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
Creates a new instance based on
capabilities.- Parameters:
remoteAddress- Agent API base URL (e.g. http://localhost:8585/)options- take a look atFirefoxOptions- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(java.net.URL remoteAddress, org.openqa.selenium.firefox.FirefoxOptions options, ReportType reportType) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using provided Agent URL and default token.Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
Creates a new instance based on
capabilities.- Parameters:
remoteAddress- Agent API base URL (e.g. http://localhost:8585/)options- take a look atFirefoxOptionsreportType- A type of report to produce - cloud, local or both.- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(java.net.URL remoteAddress, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using provided Agent URL, default token and Project name.Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
Creates a new instance based on
capabilities.- Parameters:
remoteAddress- Agent API base URL (e.g. http://localhost:8585/)options- take a look atFirefoxOptionsprojectName- Project name to report- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(java.net.URL remoteAddress, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, ReportType reportType) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using provided Agent URL, default token and Project name.Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
Creates a new instance based on
capabilities.- Parameters:
remoteAddress- Agent API base URL (e.g. http://localhost:8585/)options- take a look atFirefoxOptionsprojectName- Project name to reportreportType- A type of report to produce - cloud, local or both.- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(java.net.URL remoteAddress, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, java.lang.String jobName) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using provided Agent URL and default token, Project and Job names.Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
Creates a new instance based on
capabilities.- Parameters:
remoteAddress- Agent API base URL (e.g. http://localhost:8585/)options- take a look atFirefoxOptionsprojectName- Project name to reportjobName- Job name to report- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(java.net.URL remoteAddress, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, java.lang.String jobName, ReportType reportType) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using provided Agent URL and default token, Project and Job names.Default token can be set using TP_DEV_TOKEN environment variable. You can get a token from SDK page
Creates a new instance based on
capabilities.- Parameters:
remoteAddress- Agent API base URL (e.g. http://localhost:8585/)options- take a look atFirefoxOptionsprojectName- Project name to reportjobName- Job name to reportreportType- A type of report to produce - cloud, local or both.- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(java.net.URL remoteAddress, java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using provided Agent URL and token.- Parameters:
remoteAddress- Agent API base URL (e.g. http://localhost:8585/)token- Development token that should be obtained from SDK pageoptions- take a look atFirefoxOptions- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(java.net.URL remoteAddress, java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options, ReportType reportType) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using provided Agent URL and token.- Parameters:
remoteAddress- Agent API base URL (e.g. http://localhost:8585/)token- Development token that should be obtained from SDK pageoptions- take a look atFirefoxOptionsreportType- A type of report to produce - cloud, local or both.- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
FirefoxDriver
public FirefoxDriver(java.net.URL remoteAddress, java.lang.String token, org.openqa.selenium.firefox.FirefoxOptions options, java.lang.String projectName, java.lang.String jobName, boolean disableReports, ReportType reportType) throws InvalidTokenException, AgentConnectException, java.io.IOException, ObsoleteVersionExceptionInitiates a new session with the Agent using provided Agent URL, token, Project and Job names.- Parameters:
remoteAddress- Agent API base URL (e.g. http://localhost:8585/)token- Development token that should be obtained from SDK pageoptions- take a look atFirefoxOptionsprojectName- Project name to reportjobName- Job name to reportdisableReports- True to disable automatic reporting of driver commands and tests, otherwise False.reportType- A type of report to produce - cloud, local or both.- Throws:
AgentConnectException- if Agent is not responding or responds with an errorInvalidTokenException- if the token provided is invalidjava.io.IOException- if the Agent API base URL provided is malformedObsoleteVersionException- if the SDK version is incompatible with the Agent
-
-
Method Detail
-
startSession
protected void startSession(org.openqa.selenium.Capabilities capabilities)
Sets capabilities and sessionId obtained from the Agent when creating the original session.- Overrides:
startSessionin classorg.openqa.selenium.remote.RemoteWebDriver
-
quit
public void quit()
Removes shutdown hook and callsstop().- Specified by:
quitin interfaceorg.openqa.selenium.WebDriver- Overrides:
quitin classorg.openqa.selenium.remote.RemoteWebDriver
-
stop
public void stop()
Quits the driver and stops the session with the Agent, cleaning up after itself.- Specified by:
stopin interfaceReportingDriver
-
report
public Reporter report()
Provides access to the reporting functionality and settings.- Specified by:
reportin interfaceReportingDriver- Returns:
Reporterinstance.
-
-