api reference
Index of Taiko's API.
You can use them in Taiko's recorder as well as scripts. Use the API in Taiko's recorder as follows> openBrowser()
In your test scripts you need to import the API
const { openBrowser, goto, click } = require('taiko')
Before using it
(async () => {
await openBrowser();
await goto('google.com');
await click('Google search');
})();
Browser actions
- openBrowser
- closeBrowser
- client
- switchTo
- intercept
- emulateNetwork
- emulateDevice
- setViewPort
- resizeWindow
- openTab
- closeTab
- openIncognitoWindow
- closeIncognitoWindow
- overridePermissions
- clearPermissionOverrides
- setCookie
- deleteCookies
- getCookies
- setLocation
- clearIntercept
Page actions
- goto
- reload
- goBack
- goForward
- currentURL
- title
- click
- doubleClick
- rightClick
- dragAndDrop
- hover
- focus
- write
- clear
- attach
- press
- highlight
- clearHighlights
- mouseAction
- scrollTo
- scrollRight
- scrollLeft
- scrollUp
- scrollDown
- screenshot
- tap
- emulateTimezone
Selectors
- $
- image
- link
- listItem
- button
- fileField
- timeField
- textBox
- dropDown
- checkBox
- radioButton
- text
- tableCell
- color
- range