getHtml method

Future<String> getHtml()

Gets the HTML content of the current page

Implementation

Future<String> getHtml() async {
  _checkDisposed();

  if (_controller == null) {
    throw ScrapingException.validation(
      'Browser not initialized',
      isRetryable: false,
    );
  }

  final html = await _controller!.getHtml();
  return html ?? '';
}