Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CustomHttpCommandExecutor"/> class.
        /// </summary>
        /// <param name="addressOfRemoteServer">URL of the remote Selenium server managed by the Agent.</param>
        /// <param name="disableReports">True if all reporting should be disabled, false otherwise.</param>
        /// <param name="remoteConnectionTimeout">Timeout for the remote connection to the WebDriver server executing the commands.</param>
        public CustomHttpCommandExecutor(Uri addressOfRemoteServer, bool disableReports, TimeSpan remoteConnectionTimeout)
            : base(addressOfRemoteServer, remoteConnectionTimeout)
        {
            // If the driver returned by the Agent is in W3C mode, we need to update the command info repository
            // associated with the base HttpCommandExecutor to the W3C command info repository (default is OSS).
            if (AgentClient.GetInstance().IsInW3CMode())
            {
                FieldInfo commandInfoRepositoryField = typeof(HttpCommandExecutor).GetField("commandInfoRepository", BindingFlags.Instance | BindingFlags.NonPublic);
                commandInfoRepositoryField.SetValue(this, typeof(AppiumCommand).CallPrivateStaticMethod("Merge", new object[] { new W3CWireProtocolCommandInfoRepository() }));
            }

            this.ReportingCommandExecutor = new ReportingCommandExecutor(this, disableReports);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomHttpCommandExecutor"/> class.
 /// </summary>
 /// <param name="addressOfRemoteServer">URL of the remote Selenium server managed by the Agent.</param>
 /// <param name="disableReports">True if all reporting should be disabled, false otherwise.</param>
 /// <param name="remoteConnectionTimeout">Timeout for the remote connection to the WebDriver server executing the commands.</param>
 public CustomHttpCommandExecutor(Uri addressOfRemoteServer, bool disableReports, TimeSpan remoteConnectionTimeout)
     : base(addressOfRemoteServer, remoteConnectionTimeout)
 {
     this.ReportingCommandExecutor = new ReportingCommandExecutor(this, disableReports);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GenericCommandExecutor"/> class.
 /// </summary>
 /// <param name="addressOfRemoteServer">URL of the Agent.</param>
 /// <param name="disableReports">True if all reporting should be disabled, false otherwise.</param>
 public GenericCommandExecutor(Uri addressOfRemoteServer, bool disableReports)
 {
     this.ReportingCommandExecutor = new ReportingCommandExecutor(this, disableReports);
 }