Ejemplo n.º 1
0
 public void Dispose()
 {
     page = null;
     browser?.CloseAsync();
     browser = null;
     playwright?.Dispose();
     playwright = null;
 }
Ejemplo n.º 2
0
    public async Task DisposeAsync()
    {
        if (browser != null)
        {
            await browser.DisposeAsync();
        }

        playwright?.Dispose();

        if (process != null)
        {
            process.Kill();
            process.Dispose();
        }
    }
Ejemplo n.º 3
0
        public async virtual Task DisposeAsync()
        {
            if (_disposed)
            {
                return;
            }

            _disposed = true;

            if (Browser != null)
            {
                await Browser.DisposeAsync();
            }

            _playright?.Dispose();

            if (_host != null)
            {
                await _host.StopAsync();

                _host.Dispose();
            }
        }
Ejemplo n.º 4
0
 public void Dispose()
 {
     playwright?.Dispose();
 }
Ejemplo n.º 5
0
        public async void Dispose()
        {
            await Browser.DisposeAsync();

            playwright.Dispose();
        }