Class GenericDriver

  • All Implemented Interfaces:
    ReportingDriver

    public final class GenericDriver
    extends java.lang.Object
    implements ReportingDriver
    Generic Driver that can be used to perform a non-UI automation.
    • Constructor Summary

      Constructors 
      Constructor Description
      GenericDriver()
      Initiates a new session with the Agent using default token and URL.
      GenericDriver​(boolean disableReports)
      Initiates a new session with the Agent using default token and URL and reports commands.
      GenericDriver​(java.lang.String projectName)
      Initiates a new session with the Agent using default token and URL with Project name.
      GenericDriver​(java.lang.String projectName, java.lang.String jobName)
      Initiates a new session with the Agent using default token and URL.
      GenericDriver​(java.lang.String token, java.lang.String projectName, java.lang.String jobName)
      Initiates a new session with the Agent using provided token and default URL and Project name.
      GenericDriver​(java.net.URL remoteAddress)
      Initiates a new session with the Agent using provided Agent URL and default token.
      GenericDriver​(java.net.URL remoteAddress, java.lang.String token)
      Initiates a new session with the Agent using provided Agent URL and token.
      GenericDriver​(java.net.URL remoteAddress, java.lang.String projectName, java.lang.String jobName)
      Initiates a new session with the Agent using provided Agent URL, default token, Project and Job names.
      GenericDriver​(java.net.URL remoteAddress, java.lang.String token, java.lang.String projectName, java.lang.String jobName, boolean disableReports)
      Initiates a new session with the Agent using provided Agent URL, token, Project and Job names.
    • Constructor Detail

      • GenericDriver

        public GenericDriver()
                      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

        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.io.IOException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • GenericDriver

        public GenericDriver​(boolean disableReports)
                      throws InvalidTokenException,
                             AgentConnectException,
                             java.io.IOException,
                             ObsoleteVersionException
        Initiates a new session with the Agent using default token and URL and reports commands.

        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:
        disableReports - True to disable automatic reporting of driver commands and tests, otherwise False.
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.io.IOException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • GenericDriver

        public GenericDriver​(java.lang.String projectName)
                      throws InvalidTokenException,
                             AgentConnectException,
                             java.io.IOException,
                             ObsoleteVersionException
        Initiates 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:
        projectName - Project name to report
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.io.IOException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • GenericDriver

        public GenericDriver​(java.lang.String projectName,
                             java.lang.String jobName)
                      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

        Creates a new instance based on capabilities.

        Parameters:
        projectName - Project name to report
        jobName - Job name to report
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.io.IOException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • GenericDriver

        public GenericDriver​(java.lang.String token,
                             java.lang.String projectName,
                             java.lang.String jobName)
                      throws InvalidTokenException,
                             AgentConnectException,
                             java.io.IOException,
                             ObsoleteVersionException
        Initiates 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 page
        projectName - Project name to report
        jobName - Job name to report
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.io.IOException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • GenericDriver

        public GenericDriver​(java.net.URL remoteAddress)
                      throws InvalidTokenException,
                             AgentConnectException,
                             java.io.IOException,
                             ObsoleteVersionException
        Initiates 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/)
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.io.IOException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • GenericDriver

        public GenericDriver​(java.net.URL remoteAddress,
                             java.lang.String projectName,
                             java.lang.String jobName)
                      throws InvalidTokenException,
                             AgentConnectException,
                             java.io.IOException,
                             ObsoleteVersionException
        Initiates a new session with the Agent using provided Agent URL, 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/)
        projectName - Project name to report
        jobName - Job name to report
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.io.IOException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • GenericDriver

        public GenericDriver​(java.net.URL remoteAddress,
                             java.lang.String token)
                      throws InvalidTokenException,
                             AgentConnectException,
                             java.io.IOException,
                             ObsoleteVersionException
        Initiates 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 page
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.io.IOException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent
      • GenericDriver

        public GenericDriver​(java.net.URL remoteAddress,
                             java.lang.String token,
                             java.lang.String projectName,
                             java.lang.String jobName,
                             boolean disableReports)
                      throws InvalidTokenException,
                             AgentConnectException,
                             java.io.IOException,
                             ObsoleteVersionException
        Initiates 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 page
        projectName - Project name to report
        jobName - Job name to report
        disableReports - True to disable automatic reporting of driver commands and tests, otherwise False.
        Throws:
        AgentConnectException - if Agent is not responding or responds with an error
        InvalidTokenException - if the token provided is invalid
        java.io.IOException - if the Agent API base URL provided is malformed
        ObsoleteVersionException - if the SDK version is incompatible with the Agent