addScriptTag method
Adds a <script> tag into the page with the desired url or content.
Parameters:
url: URL of a script to be added.file: JavaScript file to be injected into framecontent: Raw JavaScript content to be injected into frame.type: Script type. Use 'module' in order to load a Javascript ES6 module. See script for more details.
Returns a Future<ElementHandle> which resolves to the added tag when the script's onload fires or when the script content was injected into frame.
Implementation
Future<ElementHandle> addScriptTag({
String? url,
File? file,
String? content,
String? type,
}) {
return _mainWorld.addScriptTag(
url: url,
file: file,
content: content,
type: type,
);
}