Exemplo n.º 1
0
        public async Task SetPageLoad(TimeSpan time, CancellationToken cancellationToken = default(CancellationToken))
        {
            await asyncFirefoxDriver.CheckConnected(cancellationToken).ConfigureAwait(false);

            if (asyncFirefoxDriver.ClientMarionette == null)
            {
                throw new Exception("error: no clientMarionette");
            }
            var comm1 = new SetTimeoutsCommand(SetTimeoutsCommand.TimeoutType.page_load, (int)time.TotalMilliseconds);
            await asyncFirefoxDriver.ClientMarionette.SendRequestAsync(comm1, cancellationToken).ConfigureAwait(false);

            if (comm1.Error != null)
            {
                throw new WebBrowserException(comm1.Error);
            }
        }
Exemplo n.º 2
0
 public Task <TimeSpan> GetImplicitWait(CancellationToken cancellationToken = default(CancellationToken))
 {
     return(GetTimeout(SetTimeoutsCommand.GetTimeoutTypeStr(SetTimeoutsCommand.TimeoutType.implicitWait), cancellationToken));
 }
Exemplo n.º 3
0
 public Task <TimeSpan> GetPageLoad(CancellationToken cancellationToken = default(CancellationToken))
 {
     return(GetTimeout(SetTimeoutsCommand.GetTimeoutTypeStr(SetTimeoutsCommand.TimeoutType.page_load), cancellationToken));
 }
Exemplo n.º 4
0
 public Task <TimeSpan> GetAsynchronousJavaScript(CancellationToken cancellationToken = default(CancellationToken))
 {
     return(GetTimeout(SetTimeoutsCommand.GetTimeoutTypeStr(SetTimeoutsCommand.TimeoutType.script), cancellationToken));
 }