Esempio 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);
            }
        }
Esempio n. 2
0
 public Task <TimeSpan> GetImplicitWait(CancellationToken cancellationToken = default(CancellationToken))
 {
     return(GetTimeout(SetTimeoutsCommand.GetTimeoutTypeStr(SetTimeoutsCommand.TimeoutType.implicitWait), cancellationToken));
 }
Esempio n. 3
0
 public Task <TimeSpan> GetPageLoad(CancellationToken cancellationToken = default(CancellationToken))
 {
     return(GetTimeout(SetTimeoutsCommand.GetTimeoutTypeStr(SetTimeoutsCommand.TimeoutType.page_load), cancellationToken));
 }
Esempio n. 4
0
 public Task <TimeSpan> GetAsynchronousJavaScript(CancellationToken cancellationToken = default(CancellationToken))
 {
     return(GetTimeout(SetTimeoutsCommand.GetTimeoutTypeStr(SetTimeoutsCommand.TimeoutType.script), cancellationToken));
 }