HtmlDriver class

Simulates a browser window.

Constructors

HtmlDriver({BrowserImplementation browserImplementation, @deprecated BrowserImplementation browserClassFactory, List<String> languages: const ['en-US'], UserAgent userAgent: defaultUserAgent})
Constructs a new browser instance. [...]

Properties

browserClassFactory BrowserImplementation
@Deprecated('Please use "browserImplementation" instead'), read-only
browserImplementation BrowserImplementation
read-only
contentSecurityPolicy Csp
CSP attached to the content.
read / write
document → HtmlDocument
Used by 'dart:html' document.
read-only
domParserDriver DomParserDriver
Used for parsing HTML/XHTML/SVG/XML.
final
hashCode int
The hash code for this object. [...]
read-only, inherited
languages List<String>
Used by 'dart:html' window.navigator.languages.
final
loadedStyleSheets Map<String, Future<StyleSheet>>
Style sheets that have been loaded.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
selection ↔ Selection
read / write
uri Uri
URI of the current document.
read / write
uriString String
URI string.
read-only
userAgent UserAgent
User agent string.
final
window → Window
Used by 'dart:html' window.
read-only

Methods

addOutgoingMessage(dynamic message, {String targetOrigin, List<Object> transfer}) → void
Called when an outgoing message is added.
clear({Uri uri}) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
reload() → void
setDocument(Document document, {Uri uri}) → void
Replaces current document. [...]
setDocumentFromContent(String input, {Uri uri, String mime, ContentTypeSniffer contentTypeSniffer: const ContentTypeSniffer()}) → void
Loads document from the string and calls setDocument.
setDocumentFromHttpClientRequest(HttpClientRequest request) Future<void>
setDocumentFromHttpClientResponse(HttpClientResponse response, {HttpClientRequest request}) Future<void>
setDocumentFromUri(Uri uri, {FutureOr<void> onHttpResponse(HttpClientResponse response), String mime, ContentTypeSniffer contentTypeSniffer: const ContentTypeSniffer()}) Future<void>
Loads document from the URI and calls setDocumentFromContent.
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Properties

current HtmlDriver
Instance of the current zone.
read-only
defaultUri Uri
Default value of uri when it hasn't been specified. [...]
final
zoneLocal ZoneLocal<HtmlDriver>
Enables forking zones with a different zone-local instance.
final

Constants

defaultUserAgent → const UserAgent
Default value of: [...]
const UserAgent('Browser')