API Reference
Taiko APIs can be used in the recorder and in JavaScript test scripts.
const { openBrowser, goto, click } = require("taiko");
(async () => { await openBrowser(); await goto("google.com"); await click("Google search");})();Browser actions
Section titled “Browser actions”openBrowsercloseBrowserclientswitchTointerceptemulateNetworkemulateDevicesetViewPortresizeWindowopenTabcloseTabopenIncognitoWindowcloseIncognitoWindowoverridePermissionsclearPermissionOverridessetCookiedeleteCookiesgetCookiessetLocationclearIntercept
Page actions
Section titled “Page actions”gotoreloadgoBackgoForwardcurrentURLtitleclickdoubleClickrightClickdragAndDrophoverfocuswriteclearattachpresshighlightclearHighlightsmouseActionscrollToscrollRightscrollLeftscrollUpscrollDownscreenshottapemulateTimezone
Selectors
Section titled “Selectors”$imagelinklistItembuttonfileFieldtimeFieldtextBoxdropDowncheckBoxradioButtontexttableCellcolorrange