From 489425f2d556fa550f78497f3b2cf353fced847b Mon Sep 17 00:00:00 2001 From: BugDiver Date: Fri, 12 Oct 2018 11:18:07 +0530 Subject: [PATCH] Added support for pressing key combinations. #192 --- lib/api.json | 2 +- lib/taiko.js | 97 ++++++++++++++++++++++++++++------------------------ 2 files changed, 53 insertions(+), 46 deletions(-) diff --git a/lib/api.json b/lib/api.json index 2a06a48b6..7839ca437 100644 --- a/lib/api.json +++ b/lib/api.json @@ -1 +1 @@ -[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Launches a browser with a tab. The browser will be closed when the parent node.js process is closed."}]}]},"tags":[{"title":"example","description":"openBrowser()\nopenBrowser({ headless: false })\nopenBrowser({args:['--window-size=1440,900']})\nopenBrowser({args: [ \n '--disable-gpu',\n '--disable-dev-shm-usage',\n '--disable-setuid-sandbox',\n '--no-first-run',\n '--no-sandbox',\n '--no-zygote']}) - These are recommended args that has to be passed when running in docker"},{"title":"param","description":"{headless: true|false, args:['--window-size=1440,900']}","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"param","description":"Option to let open browser in headless/headful mode.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.headless","default":"true"},{"title":"param","description":"Args to open chromium https://peter.sh/experiments/chromium-command-line-switches/.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"Array"}},"name":"options.args"},{"title":"param","description":"Remote debugging port if not given connects to any open port.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.port","default":"0"},{"title":"param","description":"Option to ignore certificate errors.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.ignoreCertificateErrors","default":"false"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"openBrowser()\nopenBrowser({ headless: false })\nopenBrowser({args:['--window-size=1440,900']})\nopenBrowser({args: [ \n '--disable-gpu',\n '--disable-dev-shm-usage',\n '--disable-setuid-sandbox',\n '--no-first-run',\n '--no-sandbox',\n '--no-zygote']}) - These are recommended args that has to be passed when running in docker"}],"params":[{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"{headless: true|false, args:"},{"type":"linkReference","identifier":"'--window-size=1440,900'","referenceType":"shortcut","children":[{"type":"text","value":"'--window-size=1440,900'"}]},{"type":"text","value":"}"}]}]},"type":{"type":"NameExpression","name":"Object"},"properties":[{"title":"param","name":"options.headless","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Option to let open browser in headless/headful mode."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"},{"title":"param","name":"options.args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Args to open chromium "},{"type":"link","title":null,"url":"https://peter.sh/experiments/chromium-command-line-switches/","children":[{"type":"text","value":"https://peter.sh/experiments/chromium-command-line-switches/"}]},{"type":"text","value":"."}]}]},"type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"Array"}}},{"title":"param","name":"options.port","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Remote debugging port if not given connects to any open port."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"0"},{"title":"param","name":"options.ignoreCertificateErrors","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Option to ignore certificate errors."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"false"}],"default":"{headless:true}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"openBrowser","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".openBrowser"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Closes the browser and all of its tabs (if any were opened)."}]}]},"tags":[{"title":"example","description":"closeBrowser()"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"closeBrowser()"}],"params":[],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"closeBrowser","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".closeBrowser"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Gives CRI client object."}]}]},"tags":[{"title":"returns","description":null,"type":{"type":"NameExpression","name":"Object"}}],"augments":[],"examples":[],"params":[],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"Object"}}],"sees":[],"throws":[],"name":"client","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".client"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Allows to switch between tabs using URL or page title."}]}]},"tags":[{"title":"example","description":"switchTo('https://taiko.gauge.org/') - switch using URL\nswitchTo('Taiko') - switch using Title"},{"title":"param","description":"URL/Page title of the tab to switch.","type":{"type":"NameExpression","name":"string"},"name":"targetUrl"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"switchTo('https://taiko.gauge.org/') - switch using URL\nswitchTo('Taiko') - switch using Title"}],"params":[{"title":"param","name":"targetUrl","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"URL/Page title of the tab to switch."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"switchTo","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".switchTo"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Sets page viewport"}]}]},"tags":[{"title":"example","description":"setViewPort({width:600,height:800})"},{"title":"param","description":"https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDeviceMetricsOverride","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"setViewPort({width:600,height:800})"}],"params":[{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"link","title":null,"url":"https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDeviceMetricsOverride","children":[{"type":"text","value":"https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDeviceMetricsOverride"}]}]}]},"type":{"type":"NameExpression","name":"Object"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"setViewPort","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".setViewPort"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Launches a new tab with given url."}]}]},"tags":[{"title":"example","description":"openTab('https://taiko.gauge.org/')"},{"title":"param","description":"URL/Page title of the tab to switch.","type":{"type":"NameExpression","name":"string"},"name":"targetUrl"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"openTab('https://taiko.gauge.org/')"}],"params":[{"title":"param","name":"targetUrl","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"URL/Page title of the tab to switch."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"options","default":"{timeout:30000}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"openTab","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".openTab"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Closes the given tab with given url or closes current tab."}]}]},"tags":[{"title":"example","description":"closeTab() - Closes the current tab.\ncloseTab('https://gauge.org') - Closes the tab with url 'https://gauge.org'."},{"title":"param","description":"URL/Page title of the tab to switch.","type":{"type":"NameExpression","name":"string"},"name":"targetUrl"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"closeTab() - Closes the current tab.\ncloseTab('https://gauge.org') - Closes the tab with url 'https://gauge.org'."}],"params":[{"title":"param","name":"targetUrl","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"URL/Page title of the tab to switch."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"closeTab","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".closeTab"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Opens the specified URL in the browser's tab. Adds "},{"type":"inlineCode","value":"http"},{"type":"text","value":" protocol to the URL if not present."}]}]},"tags":[{"title":"example","description":"goto('https://google.com')\ngoto('google.com')"},{"title":"param","description":"URL to navigate page to.","type":{"type":"NameExpression","name":"string"},"name":"url"},{"title":"param","description":"{timeout:5000, headers:{'Authorization':'Basic cG9zdG1hbjpwYXNzd29y2A=='}} Default timeout is 30 seconds to override set options = {timeout:10000}, headers to override defaults.","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"returns","description":"Object with the description of the action performed and the final URL.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"goto('https://google.com')\ngoto('google.com')"}],"params":[{"title":"param","name":"url","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"URL to navigate page to."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"{timeout:5000, headers:{'Authorization':'Basic cG9zdG1hbjpwYXNzd29y2A=='}} Default timeout is 30 seconds to override set options = {timeout:10000}, headers to override defaults."}]}]},"type":{"type":"NameExpression","name":"Object"},"default":"{timeout:30000}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed and the final URL."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"goto","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".goto"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Reloads the page."}]}]},"tags":[{"title":"example","description":"reload('https://google.com')\nreload('https://google.com', { timeout: 10000 })"},{"title":"param","description":"URL to reload","type":{"type":"NameExpression","name":"string"},"name":"url"},{"title":"returns","description":"Object with the description of the action performed and the final URL.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"reload('https://google.com')\nreload('https://google.com', { timeout: 10000 })"}],"params":[{"title":"param","name":"url","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"URL to reload"}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed and the final URL."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"reload","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".reload"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Returns page's title."}]}]},"tags":[{"title":"returns","description":null,"type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"String"}]}}],"augments":[],"examples":[],"params":[],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"String"}]}}],"sees":[],"throws":[],"name":"title","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".title"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Fetches an element with the given selector, scrolls it into view if needed, and then clicks in the center of the element. If there's no element matching selector, the method throws an error."}]}]},"tags":[{"title":"example","description":"click('Get Started')\nclick(link('Get Started'))"},{"title":"param","description":"A selector to search for element to click. If there are multiple elements satisfying the selector, the first will be clicked.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"param","description":"Click options.","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"param","description":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass `{ timeout: 10000 }` in `options` parameter.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.waitForNavigation","default":"true"},{"title":"param","description":"wait for navigation to start. Default to 500ms","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.waitForStart","default":"500"},{"title":"param","description":"Timeout value in milliseconds for navigation after click.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.timeout","default":"5000"},{"title":"param","description":"`left`, `right`, or `middle`.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"string"}},"name":"options.button","default":"'left'"},{"title":"param","description":"Number of times to click on the element.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.clickCount","default":"1"},{"title":"param","description":"Number of elements to loop through to match the element with given selector.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.elementsToMatch","default":"10"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"click('Get Started')\nclick(link('Get Started'))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector to search for element to click. If there are multiple elements satisfying the selector, the first will be clicked."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Click options."}]}]},"type":{"type":"NameExpression","name":"Object"},"properties":[{"title":"param","name":"options.waitForNavigation","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass "},{"type":"inlineCode","value":"{ timeout: 10000 }"},{"type":"text","value":" in "},{"type":"inlineCode","value":"options"},{"type":"text","value":" parameter."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"},{"title":"param","name":"options.waitForStart","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"wait for navigation to start. Default to 500ms"}]}]},"type":{"type":"NameExpression","name":"number"},"default":"500"},{"title":"param","name":"options.timeout","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Timeout value in milliseconds for navigation after click."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"5000"},{"title":"param","name":"options.button","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"inlineCode","value":"left"},{"type":"text","value":", "},{"type":"inlineCode","value":"right"},{"type":"text","value":", or "},{"type":"inlineCode","value":"middle"},{"type":"text","value":"."}]}]},"type":{"type":"NameExpression","name":"string"},"default":"'left'"},{"title":"param","name":"options.clickCount","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Number of times to click on the element."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"1"},{"title":"param","name":"options.elementsToMatch","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Number of elements to loop through to match the element with given selector."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"10"}]}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"click","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".click"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Fetches an element with the given selector, scrolls it into view if needed, and then double clicks the element. If there's no element matching selector, the method throws an error."}]}]},"tags":[{"title":"example","description":"doubleClick('Get Started')\ndoubleClick(button('Get Started'))"},{"title":"param","description":"A selector to search for element to click. If there are multiple elements satisfying the selector, the first will be double clicked.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"param","description":"Click options.","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"param","description":"Wait for navigation after the click. Default navigation timout is 15 seconds, to override pass `{ timeout: 10000 }` in `options` parameter.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.waitForNavigation","default":"true"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"doubleClick('Get Started')\ndoubleClick(button('Get Started'))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector to search for element to click. If there are multiple elements satisfying the selector, the first will be double clicked."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Click options."}]}]},"type":{"type":"NameExpression","name":"Object"},"properties":[{"title":"param","name":"options.waitForNavigation","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wait for navigation after the click. Default navigation timout is 15 seconds, to override pass "},{"type":"inlineCode","value":"{ timeout: 10000 }"},{"type":"text","value":" in "},{"type":"inlineCode","value":"options"},{"type":"text","value":" parameter."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"}],"default":"{}"},{"title":"param","name":"args","type":{"type":"RestType"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"doubleClick","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".doubleClick"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Fetches an element with the given selector, scrolls it into view if needed, and then right clicks the element. If there's no element matching selector, the method throws an error."}]}]},"tags":[{"title":"example","description":"rightClick('Get Started')\nrightClick(text('Get Started'))"},{"title":"param","description":"A selector to search for element to right click. If there are multiple elements satisfying the selector, the first will be double clicked.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"param","description":"Click options.","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"param","description":"Wait for navigation after the click. Default navigation timout is 15 seconds, to override pass `{ timeout: 10000 }` in `options` parameter.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.waitForNavigation","default":"true"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"rightClick('Get Started')\nrightClick(text('Get Started'))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector to search for element to right click. If there are multiple elements satisfying the selector, the first will be double clicked."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Click options."}]}]},"type":{"type":"NameExpression","name":"Object"},"properties":[{"title":"param","name":"options.waitForNavigation","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wait for navigation after the click. Default navigation timout is 15 seconds, to override pass "},{"type":"inlineCode","value":"{ timeout: 10000 }"},{"type":"text","value":" in "},{"type":"inlineCode","value":"options"},{"type":"text","value":" parameter."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"}],"default":"{}"},{"title":"param","name":"args","type":{"type":"RestType"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"rightClick","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".rightClick"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Fetches an element with the given selector, scrolls it into view if needed, and then hovers over the center of the element. If there's no element matching selector, the method throws an error."}]}]},"tags":[{"title":"example","description":"hover('Get Started')\nhover(link('Get Started'))"},{"title":"param","description":"A selector to search for element to right click. If there are multiple elements satisfying the selector, the first will be hovered.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"hover('Get Started')\nhover(link('Get Started'))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector to search for element to right click. If there are multiple elements satisfying the selector, the first will be hovered."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},{"title":"param","name":"options","default":"{}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"hover","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".hover"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Fetches an element with the given selector and focuses it. If there's no element matching selector, the method throws an error."}]}]},"tags":[{"title":"example","description":"focus(textField('Username:'))"},{"title":"param","description":"A selector of an element to focus. If there are multiple elements satisfying the selector, the first will be focused.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"param","description":"{waitForNavigation:true,waitForStart:500,timeout:10000}","type":{"type":"NameExpression","name":"object"},"name":"options"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"focus(textField('Username:'))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector of an element to focus. If there are multiple elements satisfying the selector, the first will be focused."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"{waitForNavigation:true,waitForStart:500,timeout:10000}"}]}]},"type":{"type":"NameExpression","name":"object"},"default":"{}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"focus","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".focus"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Types the given text into the focused or given element."}]}]},"tags":[{"title":"example","description":"write('admin', into('Username:'))\nwrite('admin', 'Username:')\nwrite('admin')"},{"title":"param","description":"Text to type into the element.","type":{"type":"NameExpression","name":"string"},"name":"text"},{"title":"param","description":"A selector of an element to write into.","type":{"type":"OptionalType","expression":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},"name":"into"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"Object"}},"name":"options"},{"title":"param","description":"Time to wait between key presses in milliseconds.","type":{"type":"NameExpression","name":"number"},"name":"options.delay"},{"title":"param","description":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass `{ timeout: 10000 }` in `options` parameter.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.waitForNavigation","default":"true"},{"title":"param","description":"wait for navigation to start. Default to 500ms","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.waitForStart","default":"500"},{"title":"param","description":"Timeout value in milliseconds for navigation after click","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.timeout","default":"5000"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"write('admin', into('Username:'))\nwrite('admin', 'Username:')\nwrite('admin')"}],"params":[{"title":"param","name":"text","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Text to type into the element."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"into","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector of an element to write into."}]}]},"type":{"type":"OptionalType","expression":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}},{"title":"param","name":"options","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"Object"}},"properties":[{"title":"param","name":"options.delay","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Time to wait between key presses in milliseconds."}]}]},"type":{"type":"NameExpression","name":"number"}},{"title":"param","name":"options.waitForNavigation","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass "},{"type":"inlineCode","value":"{ timeout: 10000 }"},{"type":"text","value":" in "},{"type":"inlineCode","value":"options"},{"type":"text","value":" parameter."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"},{"title":"param","name":"options.waitForStart","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"wait for navigation to start. Default to 500ms"}]}]},"type":{"type":"NameExpression","name":"number"},"default":"500"},{"title":"param","name":"options.timeout","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Timeout value in milliseconds for navigation after click"}]}]},"type":{"type":"NameExpression","name":"number"},"default":"5000"}],"default":"{delay:10}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"write","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".write"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Clears the value of given selector. If no selector is given clears the current active element."}]}]},"tags":[{"title":"example","description":"clear()\nclear(inputField({placeholder:'Email'}))"},{"title":"param","description":"A selector to search for element to clear. If there are multiple elements satisfying the selector, the first will be cleared.","type":{"type":"NameExpression","name":"selector"},"name":"selector"},{"title":"param","description":"Click options.","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"param","description":"Wait for navigation after clear. Default navigation timeout is 15 seconds, to override pass `{ timeout: 10000 }` in `options` parameter.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.waitForNavigation","default":"true"},{"title":"param","description":"wait for navigation to start. Default to 500ms","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.waitForStart","default":"500"},{"title":"param","description":"Timeout value in milliseconds for navigation after click.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.timeout","default":"5000"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"clear()\nclear(inputField({placeholder:'Email'}))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector to search for element to clear. If there are multiple elements satisfying the selector, the first will be cleared."}]}]},"type":{"type":"NameExpression","name":"selector"}},{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Click options."}]}]},"type":{"type":"NameExpression","name":"Object"},"properties":[{"title":"param","name":"options.waitForNavigation","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wait for navigation after clear. Default navigation timeout is 15 seconds, to override pass "},{"type":"inlineCode","value":"{ timeout: 10000 }"},{"type":"text","value":" in "},{"type":"inlineCode","value":"options"},{"type":"text","value":" parameter."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"},{"title":"param","name":"options.waitForStart","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"wait for navigation to start. Default to 500ms"}]}]},"type":{"type":"NameExpression","name":"number"},"default":"500"},{"title":"param","name":"options.timeout","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Timeout value in milliseconds for navigation after click."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"5000"}],"default":"{}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"clear","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".clear"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Attaches a file to a file input element."}]}]},"tags":[{"title":"example","description":"attach('c:/abc.txt', to('Please select a file:'))\nattach('c:/abc.txt', 'Please select a file:')"},{"title":"param","description":"The path of the file to be attached.","type":{"type":"NameExpression","name":"string"},"name":"filepath"},{"title":"param","description":"The file input element to which to attach the file.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"to"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"attach('c:/abc.txt', to('Please select a file:'))\nattach('c:/abc.txt', 'Please select a file:')"}],"params":[{"title":"param","name":"filepath","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The path of the file to be attached."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"to","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The file input element to which to attach the file."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"attach","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".attach"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Presses the given key."}]}]},"tags":[{"title":"example","description":"press('Enter')\npress('a')"},{"title":"param","description":"Name of key to press, such as ArrowLeft. See [USKeyboardLayout](https://github.com/getgauge/taiko/blob/master/lib/USKeyboardLayout.js) for a list of all key names.","type":{"type":"NameExpression","name":"string"},"name":"key"},{"title":"param","description":null,"type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"param","description":"If specified, generates an input event with this text.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"string"}},"name":"options.text"},{"title":"param","description":"Time to wait between keydown and keyup in milliseconds.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.delay","default":"0"},{"title":"param","description":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass `{ timeout: 10000 }` in `options` parameter.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.waitForNavigation","default":"true"},{"title":"param","description":"wait for navigation to start. Default to 500ms","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.waitForStart","default":"500"},{"title":"param","description":"Timeout value in milliseconds for navigation after click.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.timeout","default":"5000"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"press('Enter')\npress('a')"}],"params":[{"title":"param","name":"key","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Name of key to press, such as ArrowLeft. See "},{"type":"link","title":null,"url":"https://github.com/getgauge/taiko/blob/master/lib/USKeyboardLayout.js","children":[{"type":"text","value":"USKeyboardLayout"}]},{"type":"text","value":" for a list of all key names."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"options","type":{"type":"NameExpression","name":"Object"},"properties":[{"title":"param","name":"options.text","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"If specified, generates an input event with this text."}]}]},"type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"string"}}},{"title":"param","name":"options.delay","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Time to wait between keydown and keyup in milliseconds."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"0"},{"title":"param","name":"options.waitForNavigation","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass "},{"type":"inlineCode","value":"{ timeout: 10000 }"},{"type":"text","value":" in "},{"type":"inlineCode","value":"options"},{"type":"text","value":" parameter."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"},{"title":"param","name":"options.waitForStart","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"wait for navigation to start. Default to 500ms"}]}]},"type":{"type":"NameExpression","name":"number"},"default":"500"},{"title":"param","name":"options.timeout","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Timeout value in milliseconds for navigation after click."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"5000"}],"default":"{}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"press","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".press"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Highlights the given element on the page by drawing a red rectangle around it. This is useful for debugging purposes."}]}]},"tags":[{"title":"example","description":"highlight('Get Started')\nhighlight(link('Get Started'))"},{"title":"param","description":"A selector of an element to highlight. If there are multiple elements satisfying the selector, the first will be highlighted.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"highlight('Get Started')\nhighlight(link('Get Started'))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector of an element to highlight. If there are multiple elements satisfying the selector, the first will be highlighted."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"highlight","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".highlight"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Scrolls the page to the given element."}]}]},"tags":[{"title":"example","description":"scrollTo('Get Started')\nscrollTo(link('Get Started'))"},{"title":"param","description":"A selector of an element to scroll to.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"scrollTo('Get Started')\nscrollTo(link('Get Started'))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector of an element to scroll to."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},{"title":"param","name":"options","default":"{}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"scrollTo","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".scrollTo"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Scrolls the page/element to the right."}]}]},"tags":[{"title":"example","description":"scrollRight()\nscrollRight(1000)\nscrollRight('Element containing text')\nscrollRight('Element containing text', 1000)"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]}},"name":"e","default":"'Window'"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"px","default":"100"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"scrollRight()\nscrollRight(1000)\nscrollRight('Element containing text')\nscrollRight('Element containing text', 1000)"}],"params":[{"title":"param","name":"e","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]},"default":"'Window'"},{"title":"param","name":"px","type":{"type":"NameExpression","name":"number"},"default":"100"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"scrollRight","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".scrollRight"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Scrolls the page/element to the left."}]}]},"tags":[{"title":"example","description":"scrollLeft()\nscrollLeft(1000)\nscrollLeft('Element containing text')\nscrollLeft('Element containing text', 1000)"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]}},"name":"e","default":"'Window'"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"px","default":"100"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"scrollLeft()\nscrollLeft(1000)\nscrollLeft('Element containing text')\nscrollLeft('Element containing text', 1000)"}],"params":[{"title":"param","name":"e","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]},"default":"'Window'"},{"title":"param","name":"px","type":{"type":"NameExpression","name":"number"},"default":"100"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"scrollLeft","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".scrollLeft"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Scrolls up the page/element."}]}]},"tags":[{"title":"example","description":"scrollUp()\nscrollUp(1000)\nscrollUp('Element containing text')\nscrollUp('Element containing text', 1000)"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]}},"name":"e","default":"'Window'"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"px","default":"100"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"scrollUp()\nscrollUp(1000)\nscrollUp('Element containing text')\nscrollUp('Element containing text', 1000)"}],"params":[{"title":"param","name":"e","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]},"default":"'Window'"},{"title":"param","name":"px","type":{"type":"NameExpression","name":"number"},"default":"100"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"scrollUp","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".scrollUp"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Scrolls down the page/element."}]}]},"tags":[{"title":"example","description":"scrollDown()\nscrollDown(1000)\nscrollDown('Element containing text')\nscrollDown('Element containing text', 1000)"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]}},"name":"e","default":"'Window'"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"px","default":"100"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"scrollDown()\nscrollDown(1000)\nscrollDown('Element containing text')\nscrollDown('Element containing text', 1000)"}],"params":[{"title":"param","name":"e","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]},"default":"'Window'"},{"title":"param","name":"px","type":{"type":"NameExpression","name":"number"},"default":"100"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"scrollDown","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".scrollDown"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Captures a screenshot of the page. Appends timeStamp to filename if no filepath given."}]}]},"tags":[{"title":"example","description":"screenshot()\nscreenshot({path : 'screenshot.png'})"},{"title":"param","description":"{path:'screenshot.png'} or {encoding:'base64'}","type":{"type":"NameExpression","name":"object"},"name":"options"},{"title":"returns","description":"Promise which resolves to buffer with captured screenshot if {encoding:'base64} given.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Buffer"}]}},{"title":"returns","description":"Object with the description of the action performed","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"object"}]}}],"augments":[],"examples":[{"description":"screenshot()\nscreenshot({path : 'screenshot.png'})"}],"params":[{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"{path:'screenshot.png'} or {encoding:'base64'}"}]}]},"type":{"type":"NameExpression","name":"object"},"default":"{}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Promise which resolves to buffer with captured screenshot if {encoding:'base64} given."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Buffer"}]}},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed"}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"object"}]}}],"sees":[],"throws":[],"name":"screenshot","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".screenshot"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify elements on the web page via XPath or CSS selector."}]}]},"tags":[{"title":"example","description":"highlight($(`//*[text()='text']`))\n$(`//*[text()='text']`).exists()\n$(`#id`)"},{"title":"param","description":"XPath or CSS selector.","type":{"type":"NameExpression","name":"string"},"name":"selector"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"highlight($(`//*[text()='text']`))\n$(`//*[text()='text']`).exists()\n$(`#id`)"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"XPath or CSS selector."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"$","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".$"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify an image on a web page. Typically, this is done via the image's alt text or attribute and value pairs."}]}]},"tags":[{"title":"example","description":"click(image('alt'))\nimage('alt').exists()"},{"title":"param","description":"The image's alt text.","type":{"type":"NameExpression","name":"string"},"name":"alt"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"click(image('alt'))\nimage('alt').exists()"}],"params":[{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}},{"title":"param","name":"alt","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The image's alt text."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"image","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".image"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a link on a web page with text or attribute and value pairs."}]}]},"tags":[{"title":"example","description":"click(link('Get Started'))\nlink('Get Started').exists()"},{"title":"param","description":"The link text.","type":{"type":"NameExpression","name":"string"},"name":"text"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"click(link('Get Started'))\nlink('Get Started').exists()"}],"params":[{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}},{"title":"param","name":"text","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The link text."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"link","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".link"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a list item (HTML "},{"type":"html","value":"
  • "},{"type":"text","value":" element) on a web page with label or attribute and value pairs."}]}]},"tags":[{"title":"example","description":"highlight(listItem('Get Started'))\nlistItem('Get Started').exists()"},{"title":"param","description":"The label of the list item.","type":{"type":"NameExpression","name":"string"},"name":"label"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"highlight(listItem('Get Started'))\nlistItem('Get Started').exists()"}],"params":[{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}},{"title":"param","name":"label","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The label of the list item."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"listItem","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".listItem"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a button on a web page with label or attribute and value pairs."}]}]},"tags":[{"title":"example","description":"highlight(button('Get Started'))\nbutton('Get Started').exists()"},{"title":"param","description":"The button label.","type":{"type":"NameExpression","name":"string"},"name":"label"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"highlight(button('Get Started'))\nbutton('Get Started').exists()"}],"params":[{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}},{"title":"param","name":"label","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The button label."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"button","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".button"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify an input field on a web page with label or attribute and value pairs."}]}]},"tags":[{"title":"example","description":"focus(inputField({'id':'name'})\ninputField({'id': 'name'}).exists()"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"focus(inputField({'id':'name'})\ninputField({'id': 'name'}).exists()"}],"params":[{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"inputField","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".inputField"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a file input field on a web page either with label or with attribute and value pairs."}]}]},"tags":[{"title":"example","description":"fileField('Please select a file:').value()\nfileField('Please select a file:').exists()\nfileField({'id':'file'}).exists()"},{"title":"param","description":"The label (human-visible name) of the file input field.","type":{"type":"NameExpression","name":"string"},"name":"label"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"fileField('Please select a file:').value()\nfileField('Please select a file:').exists()\nfileField({'id':'file'}).exists()"}],"params":[{"title":"param","name":"label","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The label (human-visible name) of the file input field."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"fileField","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".fileField"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a text field on a web page either with label or with attribute and value pairs."}]}]},"tags":[{"title":"example","description":"focus(textField('Username:'))\ntextField('Username:').exists()"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"The label (human-visible name) of the text field.","type":{"type":"NameExpression","name":"string"},"name":"label"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"focus(textField('Username:'))\ntextField('Username:').exists()"}],"params":[{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"label","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The label (human-visible name) of the text field."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"textField","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".textField"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a combo box on a web page either with label or with attribute and value pairs.\nAny value can be selected using value or text of the options."}]}]},"tags":[{"title":"example","description":"comboBox('Vehicle:').select('Car')\ncomboBox('Vehicle:').value()\ncomboBox('Vehicle:').exists()"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"The label (human-visible name) of the combo box.","type":{"type":"NameExpression","name":"string"},"name":"label"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"comboBox('Vehicle:').select('Car')\ncomboBox('Vehicle:').value()\ncomboBox('Vehicle:').exists()"}],"params":[{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}},{"title":"param","name":"label","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The label (human-visible name) of the combo box."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"comboBox","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".comboBox"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a checkbox on a web page either with label or with attribute and value pairs."}]}]},"tags":[{"title":"example","description":"checkBox('Vehicle').check()\ncheckBox('Vehicle').uncheck()\ncheckBox('Vehicle').isChecked()\ncheckBox('Vehicle').exists()"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attributeValuePairs"},{"title":"param","description":"The label (human-visible name) of the check box.","type":{"type":"NameExpression","name":"string"},"name":"label"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"checkBox('Vehicle').check()\ncheckBox('Vehicle').uncheck()\ncheckBox('Vehicle').isChecked()\ncheckBox('Vehicle').exists()"}],"params":[{"title":"param","name":"attrValuePairs"},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}},{"title":"param","name":"attributeValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"label","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The label (human-visible name) of the check box."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"checkBox","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".checkBox"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a radio button on a web page either with label or with attribute and value pairs."}]}]},"tags":[{"title":"example","description":"radioButton('Vehicle').select()\nradioButton('Vehicle').deselect()\nradioButton('Vehicle').isSelected()\nradioButton('Vehicle').exists()"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attributeValuePairs"},{"title":"param","description":"The label (human-visible name) of the radio button.","type":{"type":"NameExpression","name":"string"},"name":"label"},{"title":"param","description":null,"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"radioButton('Vehicle').select()\nradioButton('Vehicle').deselect()\nradioButton('Vehicle').isSelected()\nradioButton('Vehicle').exists()"}],"params":[{"title":"param","name":"attrValuePairs"},{"title":"param","name":"args","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}},{"title":"param","name":"attributeValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"label","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The label (human-visible name) of the radio button."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"radioButton","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".radioButton"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify an element with text."}]}]},"tags":[{"title":"example","description":"highlight(text('Vehicle'))\ntext('Vehicle').exists()"},{"title":"param","description":"Text to match.","type":{"type":"NameExpression","name":"string"},"name":"text"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"highlight(text('Vehicle'))\ntext('Vehicle').exists()"}],"params":[{"title":"param","name":"text","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Text to match."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"text","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".text"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify an element containing the text."}]}]},"tags":[{"title":"example","description":"contains('Vehicle').exists()"},{"title":"param","description":"Text to match.","type":{"type":"NameExpression","name":"string"},"name":"text"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"contains('Vehicle').exists()"}],"params":[{"title":"param","name":"text","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Text to match."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"contains","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".contains"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"relativeSelector","title":null,"jsdoc":true,"children":[{"type":"text","value":"relativeSelector"}]},{"type":"text","value":" lets you perform relative HTML element searches."}]}]},"tags":[{"title":"example","description":"click(link(\"Block\", toLeftOf(\"name\"))"},{"title":"param","description":"Web element selector.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"augments":[],"examples":[{"description":"click(link(\"Block\", toLeftOf(\"name\"))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Web element selector."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"sees":[],"throws":[],"name":"toLeftOf","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".toLeftOf"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"relativeSelector","title":null,"jsdoc":true,"children":[{"type":"text","value":"relativeSelector"}]},{"type":"text","value":" lets you perform relative HTML element searches."}]}]},"tags":[{"title":"example","description":"click(link(\"Block\", toRightOf(\"name\"))"},{"title":"param","description":"Web element selector.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"augments":[],"examples":[{"description":"click(link(\"Block\", toRightOf(\"name\"))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Web element selector."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"sees":[],"throws":[],"name":"toRightOf","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".toRightOf"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"relativeSelector","title":null,"jsdoc":true,"children":[{"type":"text","value":"relativeSelector"}]},{"type":"text","value":" lets you perform relative HTML element searches."}]}]},"tags":[{"title":"example","description":"click(link(\"Block\", above(\"name\"))"},{"title":"param","description":"Web element selector.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"augments":[],"examples":[{"description":"click(link(\"Block\", above(\"name\"))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Web element selector."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"sees":[],"throws":[],"name":"above","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".above"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"relativeSelector","title":null,"jsdoc":true,"children":[{"type":"text","value":"relativeSelector"}]},{"type":"text","value":" lets you perform relative HTML element searches."}]}]},"tags":[{"title":"example","description":"click(link(\"Block\", below(\"name\"))"},{"title":"param","description":"Web element selector.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"augments":[],"examples":[{"description":"click(link(\"Block\", below(\"name\"))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Web element selector."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"sees":[],"throws":[],"name":"below","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".below"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"relativeSelector","title":null,"jsdoc":true,"children":[{"type":"text","value":"relativeSelector"}]},{"type":"text","value":" lets you perform relative HTML element searches."}]}]},"tags":[{"title":"example","description":"click(link(\"Block\", near(\"name\"))"},{"title":"param","description":"Web element selector.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"augments":[],"examples":[{"description":"click(link(\"Block\", near(\"name\"))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Web element selector."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"sees":[],"throws":[],"name":"near","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".near"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Lets you perform an operation when an "},{"type":"inlineCode","value":"alert"},{"type":"text","value":" with given text is shown."}]}]},"tags":[{"title":"example","description":"alert('Message', async () => await dismiss())"},{"title":"param","description":"Identify alert based on this message.","type":{"type":"NameExpression","name":"string"},"name":"message"},{"title":"param","description":"Operation to perform. Accept/Dismiss","type":{"type":"NameExpression","name":"function"},"name":"callback"}],"augments":[],"examples":[{"description":"alert('Message', async () => await dismiss())"}],"params":[{"title":"param","name":"message","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Identify alert based on this message."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"callback","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Operation to perform. Accept/Dismiss"}]}]},"type":{"type":"NameExpression","name":"function"}}],"properties":[],"returns":[],"sees":[],"throws":[],"name":"alert","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".alert"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Lets you perform an operation when a "},{"type":"inlineCode","value":"prompt"},{"type":"text","value":" with given text is shown."}]}]},"tags":[{"title":"example","description":"prompt('Message', async () => await dismiss())"},{"title":"param","description":"Identify prompt based on this message.","type":{"type":"NameExpression","name":"string"},"name":"message"},{"title":"param","description":"Operation to perform.Accept/Dismiss","type":{"type":"NameExpression","name":"function"},"name":"callback"}],"augments":[],"examples":[{"description":"prompt('Message', async () => await dismiss())"}],"params":[{"title":"param","name":"message","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Identify prompt based on this message."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"callback","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Operation to perform.Accept/Dismiss"}]}]},"type":{"type":"NameExpression","name":"function"}}],"properties":[],"returns":[],"sees":[],"throws":[],"name":"prompt","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".prompt"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Lets you perform an operation when a "},{"type":"inlineCode","value":"confirm"},{"type":"text","value":" with given text is shown."}]}]},"tags":[{"title":"example","description":"confirm('Message', async () => await dismiss())"},{"title":"param","description":"Identify confirm based on this message.","type":{"type":"NameExpression","name":"string"},"name":"message"},{"title":"param","description":"Operation to perform.Accept/Dismiss","type":{"type":"NameExpression","name":"function"},"name":"callback"}],"augments":[],"examples":[{"description":"confirm('Message', async () => await dismiss())"}],"params":[{"title":"param","name":"message","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Identify confirm based on this message."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"callback","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Operation to perform.Accept/Dismiss"}]}]},"type":{"type":"NameExpression","name":"function"}}],"properties":[],"returns":[],"sees":[],"throws":[],"name":"confirm","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".confirm"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Lets you perform an operation when a "},{"type":"inlineCode","value":"beforeunload"},{"type":"text","value":" with given text is shown."}]}]},"tags":[{"title":"example","description":"beforeunload('Message', async () => await dismiss())"},{"title":"param","description":"Identify beforeunload based on this message.","type":{"type":"NameExpression","name":"string"},"name":"message"},{"title":"param","description":"Operation to perform.Accept/Dismiss","type":{"type":"NameExpression","name":"function"},"name":"callback"}],"augments":[],"examples":[{"description":"beforeunload('Message', async () => await dismiss())"}],"params":[{"title":"param","name":"message","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Identify beforeunload based on this message."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"callback","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Operation to perform.Accept/Dismiss"}]}]},"type":{"type":"NameExpression","name":"function"}}],"properties":[],"returns":[],"sees":[],"throws":[],"name":"beforeunload","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".beforeunload"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Add interceptor for the network call to override request or mock response."}]}]},"tags":[{"title":"example","description":"case 1: block url => intercept(url)\ncase 2: mockResponse => intercept(url,{mockObject})\ncase 3: override request => intercept(url,(request) => {request.continue({overrideObject})})\ncase 4: redirect => intercept(url,redirectUrl)\ncase 5: mockResponse based on request => intercept(url,(request) => { request.respond({mockResponseObject})} )"},{"title":"param","description":"request URL to intercept","type":null,"name":"requestUrl"},{"title":"param","description":"action to be done after interception","type":null,"name":"action"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"NameExpression","name":"object"}}],"augments":[],"examples":[{"description":"case 1: block url => intercept(url)\ncase 2: mockResponse => intercept(url,{mockObject})\ncase 3: override request => intercept(url,(request) => {request.continue({overrideObject})})\ncase 4: redirect => intercept(url,redirectUrl)\ncase 5: mockResponse based on request => intercept(url,(request) => { request.respond({mockResponseObject})} )"}],"params":[{"title":"param","name":"requestUrl","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"request URL to intercept"}]}]}},{"title":"param","name":"action","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"action to be done after interception"}]}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"NameExpression","name":"object"}}],"sees":[],"throws":[],"name":"intercept","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".intercept"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Evaluates script on element matching the given selector."}]}]},"tags":[{"title":"example","description":"evaluate(link(\"something\"), (element) => element.style.backgroundColor)\nevaluate(()=>{return document.title})"},{"title":"param","description":"Web element selector.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"param","description":"callback method to execute on the element.","type":{"type":"NameExpression","name":"function"},"name":"callback"},{"title":"param","description":"Click options.","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"param","description":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass `{ timeout: 10000 }` in `options` parameter.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.waitForNavigation","default":"true"},{"title":"param","description":"wait for navigation to start. Default to 500ms","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.waitForStart","default":"500"},{"title":"param","description":"Timeout value in milliseconds for navigation after click.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.timeout","default":"5000"},{"title":"returns","description":"Object with description of action performed and return value of callback given","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"evaluate(link(\"something\"), (element) => element.style.backgroundColor)\nevaluate(()=>{return document.title})"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Web element selector."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},{"title":"param","name":"callback","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"callback method to execute on the element."}]}]},"type":{"type":"NameExpression","name":"function"}},{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Click options."}]}]},"type":{"type":"NameExpression","name":"Object"},"properties":[{"title":"param","name":"options.waitForNavigation","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass "},{"type":"inlineCode","value":"{ timeout: 10000 }"},{"type":"text","value":" in "},{"type":"inlineCode","value":"options"},{"type":"text","value":" parameter."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"},{"title":"param","name":"options.waitForStart","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"wait for navigation to start. Default to 500ms"}]}]},"type":{"type":"NameExpression","name":"number"},"default":"500"},{"title":"param","name":"options.timeout","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Timeout value in milliseconds for navigation after click."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"5000"}],"default":"{}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with description of action performed and return value of callback given"}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"evaluate","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".evaluate"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Converts seconds to milliseconds."}]}]},"tags":[{"title":"example","description":"link('Plugins').exists(intervalSecs(1))"},{"title":"param","description":"Seconds to convert.","type":{"type":"NameExpression","name":"number"},"name":"secs"},{"title":"return","description":"Milliseconds.","type":{"type":"NameExpression","name":"number"}}],"augments":[],"examples":[{"description":"link('Plugins').exists(intervalSecs(1))"}],"params":[{"title":"param","name":"secs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Seconds to convert."}]}]},"type":{"type":"NameExpression","name":"number"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Milliseconds."}]}]},"title":"returns","type":{"type":"NameExpression","name":"number"}}],"sees":[],"throws":[],"name":"intervalSecs","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".intervalSecs"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Converts seconds to milliseconds."}]}]},"tags":[{"title":"example","description":"link('Plugins').exists(intervalSecs(1), timeoutSecs(10))"},{"title":"param","description":"Seconds to convert.","type":{"type":"NameExpression","name":"number"},"name":"secs"},{"title":"return","description":"Milliseconds.","type":{"type":"NameExpression","name":"number"}}],"augments":[],"examples":[{"description":"link('Plugins').exists(intervalSecs(1), timeoutSecs(10))"}],"params":[{"title":"param","name":"secs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Seconds to convert."}]}]},"type":{"type":"NameExpression","name":"number"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Milliseconds."}]}]},"title":"returns","type":{"type":"NameExpression","name":"number"}}],"sees":[],"throws":[],"name":"timeoutSecs","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".timeoutSecs"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This function is used to improve the readability. It simply returns the parameter passed into it."}]}]},"tags":[{"title":"example","description":"attach('c:/abc.txt', to('Please select a file:'))"},{"title":"param","description":null,"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"selector"}]},"name":null},{"title":"return","description":null,"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"selector"}]}}],"augments":[],"examples":[{"description":"attach('c:/abc.txt', to('Please select a file:'))"}],"params":[{"title":"param","name":"e"}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"selector"}]}}],"sees":[],"throws":[],"name":"to","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".to"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This function is used to improve the readability. It simply returns the parameter passed into it."}]}]},"tags":[{"title":"example","description":"write(\"user\", into('Username:'))"},{"title":"param","description":null,"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"selector"}]},"name":null},{"title":"return","description":null,"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"selector"}]}}],"augments":[],"examples":[{"description":"write(\"user\", into('Username:'))"}],"params":[{"title":"param","name":"e"}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"selector"}]}}],"sees":[],"throws":[],"name":"into","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".into"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This function is used to wait for number of secs given."}]}]},"tags":[{"title":"example","description":"waitFor(intervalSecs(5))"},{"title":"param","description":null,"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"number"},{"type":"NameExpression","name":"time"}]},"name":null},{"title":"return","description":null,"type":{"type":"NameExpression","name":"promise"}}],"augments":[],"examples":[{"description":"waitFor(intervalSecs(5))"}],"params":[],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"promise"}}],"sees":[],"throws":[],"name":"waitFor","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".waitFor"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Accept callback for dialogs"}]}]},"tags":[],"augments":[],"examples":[],"params":[],"properties":[],"returns":[],"sees":[],"throws":[],"name":"accept","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".accept"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Dismiss callback for dialogs"}]}]},"tags":[],"augments":[],"examples":[],"params":[],"properties":[],"returns":[],"sees":[],"throws":[],"name":"dismiss","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".dismiss"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Identifies an element on the page."}]}]},"tags":[{"title":"callback","description":"selector"},{"title":"function","description":null,"name":null},{"title":"example","description":"link('Sign in')\nbutton('Get Started')\n$('#id')\ntext('Home')"},{"title":"param","description":"Text to identify the element.","type":{"type":"NameExpression","name":"string"},"name":"text"},{"title":"param","description":null,"type":{"type":"RestType","expression":{"type":"NameExpression","name":"string"}},"name":"args"}],"augments":[],"examples":[{"description":"link('Sign in')\nbutton('Get Started')\n$('#id')\ntext('Home')"}],"params":[{"title":"param","name":"text","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Text to identify the element."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"args","type":{"type":"RestType","expression":{"type":"NameExpression","name":"string"}}}],"properties":[],"returns":[],"sees":[],"throws":[],"kind":"function","name":"selector","type":{"type":"NameExpression","name":"Function"},"members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":"selector"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Lets you perform relative HTML element searches."}]}]},"tags":[{"title":"callback","description":"relativeSelector"},{"title":"function","description":null,"name":null},{"title":"example","description":"near('Home')\ntoLeftOf('Sign in')\ntoRightOf('Get Started')\nabove('Sign in')\nbelow('Home')\nlink('Sign In',near(\"Home\"),toLeftOf(\"Sign Out\")) - Multiple selectors can be used to perform relative search"},{"title":"param","description":"Web element selector.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"augments":[],"examples":[{"description":"near('Home')\ntoLeftOf('Sign in')\ntoRightOf('Get Started')\nabove('Sign in')\nbelow('Home')\nlink('Sign In',near(\"Home\"),toLeftOf(\"Sign Out\")) - Multiple selectors can be used to perform relative search"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Web element selector."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"sees":[],"throws":[],"kind":"function","name":"relativeSelector","type":{"type":"NameExpression","name":"Function"},"members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":"relativeSelector"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Represents a relative HTML element search. This is returned by "},{"type":"link","url":"relativeSelector","title":null,"jsdoc":true,"children":[{"type":"text","value":"relativeSelector"}]}]}]},"tags":[{"title":"example","description":"// returns RelativeSearchElement\nabove('username')"},{"title":"typedef","description":null,"type":{"type":"NameExpression","name":"Object"},"name":"RelativeSearchElement"}],"augments":[],"examples":[{"description":"// returns RelativeSearchElement\nabove('username')"}],"params":[],"properties":[],"returns":[],"sees":[],"throws":[],"kind":"typedef","name":"RelativeSearchElement","type":{"type":"NameExpression","name":"Object"},"constructorComment":{"description":"","tags":[{"title":"class","description":null,"type":null,"name":null},{"title":"ignore","description":null}],"augments":[],"examples":[],"params":[],"properties":[],"returns":[],"sees":[],"throws":[],"kind":"class","ignore":true},"members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":"RelativeSearchElement"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wrapper object for the element present on the web page. Extra methods are avaliable based on the element type."}]},{"type":"list","ordered":false,"start":null,"children":[{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"inlineCode","value":"get()"},{"type":"text","value":", "},{"type":"inlineCode","value":"exists()"},{"type":"text","value":", "},{"type":"inlineCode","value":"description"},{"type":"text","value":", text() for all the elements."}]}]},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"inlineCode","value":"value()"},{"type":"text","value":" for input field, fileField and text field."}]}]},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"inlineCode","value":"value()"},{"type":"text","value":", "},{"type":"inlineCode","value":"select()"},{"type":"text","value":" for combo box."}]}]},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"inlineCode","value":"check()"},{"type":"text","value":", "},{"type":"inlineCode","value":"uncheck()"},{"type":"text","value":", "},{"type":"inlineCode","value":"isChecked()"},{"type":"text","value":" for checkbox."}]}]},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"inlineCode","value":"select()"},{"type":"text","value":", "},{"type":"inlineCode","value":"deselect()"},{"type":"text","value":", "},{"type":"inlineCode","value":"isSelected()"},{"type":"text","value":" for radio button."}]}]}]}]},"tags":[{"title":"typedef","description":null,"type":{"type":"NameExpression","name":"Object"},"name":"ElementWrapper"},{"title":"property","description":"@private {function} get - DOM element getter. Implicitly wait for the element to appears with timeout of 10 seconds.","type":null,"name":"null"},{"title":"property","description":"Checks existence for element.","type":{"type":"FunctionType","params":[{"type":"NameExpression","name":"number"},{"type":"NameExpression","name":"number"}],"result":null},"name":"exists"},{"title":"property","description":"Describing the operation performed.","type":{"type":"NameExpression","name":"string"},"name":"description"},{"title":"property","description":"Gives innerText of all matching elements.","type":{"type":"NameExpression","name":"Array"},"name":"text"},{"title":"example","description":"link('google').exists()\nlink('google').exists(intervalSecs(1), timeoutSecs(10))\nlink('google').description\ntextField('username').value()\n$('.class').text()"}],"augments":[],"examples":[{"description":"link('google').exists()\nlink('google').exists(intervalSecs(1), timeoutSecs(10))\nlink('google').description\ntextField('username').value()\n$('.class').text()"}],"params":[],"properties":[{"title":"property","name":"exists","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Checks existence for element."}]}]},"type":{"type":"FunctionType","params":[{"type":"NameExpression","name":"number"},{"type":"NameExpression","name":"number"}],"result":null}},{"title":"property","name":"description","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Describing the operation performed."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"property","name":"text","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Gives innerText of all matching elements."}]}]},"type":{"type":"NameExpression","name":"Array"}}],"returns":[],"sees":[],"throws":[],"kind":"typedef","name":"ElementWrapper","type":{"type":"NameExpression","name":"Object"},"members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":"ElementWrapper"}] \ No newline at end of file +[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Launches a browser with a tab. The browser will be closed when the parent node.js process is closed."}]}]},"tags":[{"title":"example","description":"openBrowser()\nopenBrowser({ headless: false })\nopenBrowser({args:['--window-size=1440,900']})\nopenBrowser({args: [\n '--disable-gpu',\n '--disable-dev-shm-usage',\n '--disable-setuid-sandbox',\n '--no-first-run',\n '--no-sandbox',\n '--no-zygote']}) - These are recommended args that has to be passed when running in docker"},{"title":"param","description":"{headless: true|false, args:['--window-size=1440,900']}","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"param","description":"Option to let open browser in headless/headful mode.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.headless","default":"true"},{"title":"param","description":"Args to open chromium https://peter.sh/experiments/chromium-command-line-switches/.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"Array"}},"name":"options.args"},{"title":"param","description":"Remote debugging port if not given connects to any open port.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.port","default":"0"},{"title":"param","description":"Option to ignore certificate errors.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.ignoreCertificateErrors","default":"false"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"openBrowser()\nopenBrowser({ headless: false })\nopenBrowser({args:['--window-size=1440,900']})\nopenBrowser({args: [\n '--disable-gpu',\n '--disable-dev-shm-usage',\n '--disable-setuid-sandbox',\n '--no-first-run',\n '--no-sandbox',\n '--no-zygote']}) - These are recommended args that has to be passed when running in docker"}],"params":[{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"{headless: true|false, args:"},{"type":"linkReference","identifier":"'--window-size=1440,900'","referenceType":"shortcut","children":[{"type":"text","value":"'--window-size=1440,900'"}]},{"type":"text","value":"}"}]}]},"type":{"type":"NameExpression","name":"Object"},"properties":[{"title":"param","name":"options.headless","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Option to let open browser in headless/headful mode."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"},{"title":"param","name":"options.args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Args to open chromium "},{"type":"link","title":null,"url":"https://peter.sh/experiments/chromium-command-line-switches/","children":[{"type":"text","value":"https://peter.sh/experiments/chromium-command-line-switches/"}]},{"type":"text","value":"."}]}]},"type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"Array"}}},{"title":"param","name":"options.port","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Remote debugging port if not given connects to any open port."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"0"},{"title":"param","name":"options.ignoreCertificateErrors","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Option to ignore certificate errors."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"false"}],"default":"{headless:true}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"openBrowser","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".openBrowser"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Closes the browser and all of its tabs (if any were opened)."}]}]},"tags":[{"title":"example","description":"closeBrowser()"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"closeBrowser()"}],"params":[],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"closeBrowser","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".closeBrowser"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Gives CRI client object."}]}]},"tags":[{"title":"returns","description":null,"type":{"type":"NameExpression","name":"Object"}}],"augments":[],"examples":[],"params":[],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"Object"}}],"sees":[],"throws":[],"name":"client","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".client"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Allows to switch between tabs using URL or page title."}]}]},"tags":[{"title":"example","description":"switchTo('https://taiko.gauge.org/') - switch using URL\nswitchTo('Taiko') - switch using Title"},{"title":"param","description":"URL/Page title of the tab to switch.","type":{"type":"NameExpression","name":"string"},"name":"targetUrl"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"switchTo('https://taiko.gauge.org/') - switch using URL\nswitchTo('Taiko') - switch using Title"}],"params":[{"title":"param","name":"targetUrl","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"URL/Page title of the tab to switch."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"switchTo","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".switchTo"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Sets page viewport"}]}]},"tags":[{"title":"example","description":"setViewPort({width:600,height:800})"},{"title":"param","description":"https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDeviceMetricsOverride","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"setViewPort({width:600,height:800})"}],"params":[{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"link","title":null,"url":"https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDeviceMetricsOverride","children":[{"type":"text","value":"https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDeviceMetricsOverride"}]}]}]},"type":{"type":"NameExpression","name":"Object"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"setViewPort","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".setViewPort"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Launches a new tab with given url."}]}]},"tags":[{"title":"example","description":"openTab('https://taiko.gauge.org/')"},{"title":"param","description":"URL/Page title of the tab to switch.","type":{"type":"NameExpression","name":"string"},"name":"targetUrl"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"openTab('https://taiko.gauge.org/')"}],"params":[{"title":"param","name":"targetUrl","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"URL/Page title of the tab to switch."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"options","default":"{timeout:30000}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"openTab","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".openTab"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Closes the given tab with given url or closes current tab."}]}]},"tags":[{"title":"example","description":"closeTab() - Closes the current tab.\ncloseTab('https://gauge.org') - Closes the tab with url 'https://gauge.org'."},{"title":"param","description":"URL/Page title of the tab to switch.","type":{"type":"NameExpression","name":"string"},"name":"targetUrl"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"closeTab() - Closes the current tab.\ncloseTab('https://gauge.org') - Closes the tab with url 'https://gauge.org'."}],"params":[{"title":"param","name":"targetUrl","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"URL/Page title of the tab to switch."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"closeTab","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".closeTab"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Opens the specified URL in the browser's tab. Adds "},{"type":"inlineCode","value":"http"},{"type":"text","value":" protocol to the URL if not present."}]}]},"tags":[{"title":"example","description":"goto('https://google.com')\ngoto('google.com')"},{"title":"param","description":"URL to navigate page to.","type":{"type":"NameExpression","name":"string"},"name":"url"},{"title":"param","description":"{timeout:5000, headers:{'Authorization':'Basic cG9zdG1hbjpwYXNzd29y2A=='}} Default timeout is 30 seconds to override set options = {timeout:10000}, headers to override defaults.","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"returns","description":"Object with the description of the action performed and the final URL.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"goto('https://google.com')\ngoto('google.com')"}],"params":[{"title":"param","name":"url","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"URL to navigate page to."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"{timeout:5000, headers:{'Authorization':'Basic cG9zdG1hbjpwYXNzd29y2A=='}} Default timeout is 30 seconds to override set options = {timeout:10000}, headers to override defaults."}]}]},"type":{"type":"NameExpression","name":"Object"},"default":"{timeout:30000}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed and the final URL."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"goto","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".goto"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Reloads the page."}]}]},"tags":[{"title":"example","description":"reload('https://google.com')\nreload('https://google.com', { timeout: 10000 })"},{"title":"param","description":"URL to reload","type":{"type":"NameExpression","name":"string"},"name":"url"},{"title":"returns","description":"Object with the description of the action performed and the final URL.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"reload('https://google.com')\nreload('https://google.com', { timeout: 10000 })"}],"params":[{"title":"param","name":"url","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"URL to reload"}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed and the final URL."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"reload","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".reload"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Returns page's title."}]}]},"tags":[{"title":"returns","description":null,"type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"String"}]}}],"augments":[],"examples":[],"params":[],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"String"}]}}],"sees":[],"throws":[],"name":"title","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".title"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Fetches an element with the given selector, scrolls it into view if needed, and then clicks in the center of the element. If there's no element matching selector, the method throws an error."}]}]},"tags":[{"title":"example","description":"click('Get Started')\nclick(link('Get Started'))"},{"title":"param","description":"A selector to search for element to click. If there are multiple elements satisfying the selector, the first will be clicked.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"param","description":"Click options.","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"param","description":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass `{ timeout: 10000 }` in `options` parameter.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.waitForNavigation","default":"true"},{"title":"param","description":"wait for navigation to start. Default to 500ms","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.waitForStart","default":"500"},{"title":"param","description":"Timeout value in milliseconds for navigation after click.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.timeout","default":"5000"},{"title":"param","description":"`left`, `right`, or `middle`.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"string"}},"name":"options.button","default":"'left'"},{"title":"param","description":"Number of times to click on the element.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.clickCount","default":"1"},{"title":"param","description":"Number of elements to loop through to match the element with given selector.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.elementsToMatch","default":"10"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"click('Get Started')\nclick(link('Get Started'))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector to search for element to click. If there are multiple elements satisfying the selector, the first will be clicked."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Click options."}]}]},"type":{"type":"NameExpression","name":"Object"},"properties":[{"title":"param","name":"options.waitForNavigation","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass "},{"type":"inlineCode","value":"{ timeout: 10000 }"},{"type":"text","value":" in "},{"type":"inlineCode","value":"options"},{"type":"text","value":" parameter."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"},{"title":"param","name":"options.waitForStart","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"wait for navigation to start. Default to 500ms"}]}]},"type":{"type":"NameExpression","name":"number"},"default":"500"},{"title":"param","name":"options.timeout","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Timeout value in milliseconds for navigation after click."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"5000"},{"title":"param","name":"options.button","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"inlineCode","value":"left"},{"type":"text","value":", "},{"type":"inlineCode","value":"right"},{"type":"text","value":", or "},{"type":"inlineCode","value":"middle"},{"type":"text","value":"."}]}]},"type":{"type":"NameExpression","name":"string"},"default":"'left'"},{"title":"param","name":"options.clickCount","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Number of times to click on the element."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"1"},{"title":"param","name":"options.elementsToMatch","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Number of elements to loop through to match the element with given selector."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"10"}]}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"click","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".click"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Fetches an element with the given selector, scrolls it into view if needed, and then double clicks the element. If there's no element matching selector, the method throws an error."}]}]},"tags":[{"title":"example","description":"doubleClick('Get Started')\ndoubleClick(button('Get Started'))"},{"title":"param","description":"A selector to search for element to click. If there are multiple elements satisfying the selector, the first will be double clicked.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"param","description":"Click options.","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"param","description":"Wait for navigation after the click. Default navigation timout is 15 seconds, to override pass `{ timeout: 10000 }` in `options` parameter.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.waitForNavigation","default":"true"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"doubleClick('Get Started')\ndoubleClick(button('Get Started'))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector to search for element to click. If there are multiple elements satisfying the selector, the first will be double clicked."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Click options."}]}]},"type":{"type":"NameExpression","name":"Object"},"properties":[{"title":"param","name":"options.waitForNavigation","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wait for navigation after the click. Default navigation timout is 15 seconds, to override pass "},{"type":"inlineCode","value":"{ timeout: 10000 }"},{"type":"text","value":" in "},{"type":"inlineCode","value":"options"},{"type":"text","value":" parameter."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"}],"default":"{}"},{"title":"param","name":"args","type":{"type":"RestType"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"doubleClick","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".doubleClick"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Fetches an element with the given selector, scrolls it into view if needed, and then right clicks the element. If there's no element matching selector, the method throws an error."}]}]},"tags":[{"title":"example","description":"rightClick('Get Started')\nrightClick(text('Get Started'))"},{"title":"param","description":"A selector to search for element to right click. If there are multiple elements satisfying the selector, the first will be double clicked.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"param","description":"Click options.","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"param","description":"Wait for navigation after the click. Default navigation timout is 15 seconds, to override pass `{ timeout: 10000 }` in `options` parameter.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.waitForNavigation","default":"true"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"rightClick('Get Started')\nrightClick(text('Get Started'))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector to search for element to right click. If there are multiple elements satisfying the selector, the first will be double clicked."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Click options."}]}]},"type":{"type":"NameExpression","name":"Object"},"properties":[{"title":"param","name":"options.waitForNavigation","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wait for navigation after the click. Default navigation timout is 15 seconds, to override pass "},{"type":"inlineCode","value":"{ timeout: 10000 }"},{"type":"text","value":" in "},{"type":"inlineCode","value":"options"},{"type":"text","value":" parameter."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"}],"default":"{}"},{"title":"param","name":"args","type":{"type":"RestType"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"rightClick","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".rightClick"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Fetches an element with the given selector, scrolls it into view if needed, and then hovers over the center of the element. If there's no element matching selector, the method throws an error."}]}]},"tags":[{"title":"example","description":"hover('Get Started')\nhover(link('Get Started'))"},{"title":"param","description":"A selector to search for element to right click. If there are multiple elements satisfying the selector, the first will be hovered.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"hover('Get Started')\nhover(link('Get Started'))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector to search for element to right click. If there are multiple elements satisfying the selector, the first will be hovered."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},{"title":"param","name":"options","default":"{}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"hover","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".hover"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Fetches an element with the given selector and focuses it. If there's no element matching selector, the method throws an error."}]}]},"tags":[{"title":"example","description":"focus(textField('Username:'))"},{"title":"param","description":"A selector of an element to focus. If there are multiple elements satisfying the selector, the first will be focused.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"param","description":"{waitForNavigation:true,waitForStart:500,timeout:10000}","type":{"type":"NameExpression","name":"object"},"name":"options"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"focus(textField('Username:'))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector of an element to focus. If there are multiple elements satisfying the selector, the first will be focused."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"{waitForNavigation:true,waitForStart:500,timeout:10000}"}]}]},"type":{"type":"NameExpression","name":"object"},"default":"{}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"focus","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".focus"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Types the given text into the focused or given element."}]}]},"tags":[{"title":"example","description":"write('admin', into('Username:'))\nwrite('admin', 'Username:')\nwrite('admin')"},{"title":"param","description":"Text to type into the element.","type":{"type":"NameExpression","name":"string"},"name":"text"},{"title":"param","description":"A selector of an element to write into.","type":{"type":"OptionalType","expression":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},"name":"into"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"Object"}},"name":"options"},{"title":"param","description":"Time to wait between key presses in milliseconds.","type":{"type":"NameExpression","name":"number"},"name":"options.delay"},{"title":"param","description":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass `{ timeout: 10000 }` in `options` parameter.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.waitForNavigation","default":"true"},{"title":"param","description":"wait for navigation to start. Default to 500ms","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.waitForStart","default":"500"},{"title":"param","description":"Timeout value in milliseconds for navigation after click","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.timeout","default":"5000"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"write('admin', into('Username:'))\nwrite('admin', 'Username:')\nwrite('admin')"}],"params":[{"title":"param","name":"text","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Text to type into the element."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"into","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector of an element to write into."}]}]},"type":{"type":"OptionalType","expression":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}},{"title":"param","name":"options","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"Object"}},"properties":[{"title":"param","name":"options.delay","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Time to wait between key presses in milliseconds."}]}]},"type":{"type":"NameExpression","name":"number"}},{"title":"param","name":"options.waitForNavigation","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass "},{"type":"inlineCode","value":"{ timeout: 10000 }"},{"type":"text","value":" in "},{"type":"inlineCode","value":"options"},{"type":"text","value":" parameter."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"},{"title":"param","name":"options.waitForStart","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"wait for navigation to start. Default to 500ms"}]}]},"type":{"type":"NameExpression","name":"number"},"default":"500"},{"title":"param","name":"options.timeout","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Timeout value in milliseconds for navigation after click"}]}]},"type":{"type":"NameExpression","name":"number"},"default":"5000"}],"default":"{delay:10}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"write","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".write"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Clears the value of given selector. If no selector is given clears the current active element."}]}]},"tags":[{"title":"example","description":"clear()\nclear(inputField({placeholder:'Email'}))"},{"title":"param","description":"A selector to search for element to clear. If there are multiple elements satisfying the selector, the first will be cleared.","type":{"type":"NameExpression","name":"selector"},"name":"selector"},{"title":"param","description":"Click options.","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"param","description":"Wait for navigation after clear. Default navigation timeout is 15 seconds, to override pass `{ timeout: 10000 }` in `options` parameter.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.waitForNavigation","default":"true"},{"title":"param","description":"wait for navigation to start. Default to 500ms","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.waitForStart","default":"500"},{"title":"param","description":"Timeout value in milliseconds for navigation after click.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.timeout","default":"5000"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"clear()\nclear(inputField({placeholder:'Email'}))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector to search for element to clear. If there are multiple elements satisfying the selector, the first will be cleared."}]}]},"type":{"type":"NameExpression","name":"selector"}},{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Click options."}]}]},"type":{"type":"NameExpression","name":"Object"},"properties":[{"title":"param","name":"options.waitForNavigation","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wait for navigation after clear. Default navigation timeout is 15 seconds, to override pass "},{"type":"inlineCode","value":"{ timeout: 10000 }"},{"type":"text","value":" in "},{"type":"inlineCode","value":"options"},{"type":"text","value":" parameter."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"},{"title":"param","name":"options.waitForStart","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"wait for navigation to start. Default to 500ms"}]}]},"type":{"type":"NameExpression","name":"number"},"default":"500"},{"title":"param","name":"options.timeout","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Timeout value in milliseconds for navigation after click."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"5000"}],"default":"{}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"clear","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".clear"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Attaches a file to a file input element."}]}]},"tags":[{"title":"example","description":"attach('c:/abc.txt', to('Please select a file:'))\nattach('c:/abc.txt', 'Please select a file:')"},{"title":"param","description":"The path of the file to be attached.","type":{"type":"NameExpression","name":"string"},"name":"filepath"},{"title":"param","description":"The file input element to which to attach the file.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"to"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"attach('c:/abc.txt', to('Please select a file:'))\nattach('c:/abc.txt', 'Please select a file:')"}],"params":[{"title":"param","name":"filepath","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The path of the file to be attached."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"to","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The file input element to which to attach the file."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"attach","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".attach"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Presses the given keys."}]}]},"tags":[{"title":"example","description":"press('Enter')\npress('a')\npress(['Shift', 'ArrowLeft', 'ArrowLeft'])"},{"title":"param","description":"Name of keys to press, such as ArrowLeft. See [USKeyboardLayout](https://github.com/getgauge/taiko/blob/master/lib/USKeyboardLayout.js) for a list of all key names.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"string"},{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Array"},"applications":[{"type":"NameExpression","name":"string"}]}]},"name":"keys"},{"title":"param","description":null,"type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"param","description":"If specified, generates an input event with this text.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"string"}},"name":"options.text"},{"title":"param","description":"Time to wait between keydown and keyup in milliseconds.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.delay","default":"0"},{"title":"param","description":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass `{ timeout: 10000 }` in `options` parameter.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.waitForNavigation","default":"true"},{"title":"param","description":"wait for navigation to start. Default to 500ms","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.waitForStart","default":"500"},{"title":"param","description":"Timeout value in milliseconds for navigation after click.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.timeout","default":"5000"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"press('Enter')\npress('a')\npress(['Shift', 'ArrowLeft', 'ArrowLeft'])"}],"params":[{"title":"param","name":"keys","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Name of keys to press, such as ArrowLeft. See "},{"type":"link","title":null,"url":"https://github.com/getgauge/taiko/blob/master/lib/USKeyboardLayout.js","children":[{"type":"text","value":"USKeyboardLayout"}]},{"type":"text","value":" for a list of all key names."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"string"},{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Array"},"applications":[{"type":"NameExpression","name":"string"}]}]}},{"title":"param","name":"options","type":{"type":"NameExpression","name":"Object"},"properties":[{"title":"param","name":"options.text","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"If specified, generates an input event with this text."}]}]},"type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"string"}}},{"title":"param","name":"options.delay","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Time to wait between keydown and keyup in milliseconds."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"0"},{"title":"param","name":"options.waitForNavigation","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass "},{"type":"inlineCode","value":"{ timeout: 10000 }"},{"type":"text","value":" in "},{"type":"inlineCode","value":"options"},{"type":"text","value":" parameter."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"},{"title":"param","name":"options.waitForStart","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"wait for navigation to start. Default to 500ms"}]}]},"type":{"type":"NameExpression","name":"number"},"default":"500"},{"title":"param","name":"options.timeout","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Timeout value in milliseconds for navigation after click."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"5000"}],"default":"{}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"press","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".press"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Highlights the given element on the page by drawing a red rectangle around it. This is useful for debugging purposes."}]}]},"tags":[{"title":"example","description":"highlight('Get Started')\nhighlight(link('Get Started'))"},{"title":"param","description":"A selector of an element to highlight. If there are multiple elements satisfying the selector, the first will be highlighted.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"highlight('Get Started')\nhighlight(link('Get Started'))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector of an element to highlight. If there are multiple elements satisfying the selector, the first will be highlighted."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"highlight","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".highlight"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Scrolls the page to the given element."}]}]},"tags":[{"title":"example","description":"scrollTo('Get Started')\nscrollTo(link('Get Started'))"},{"title":"param","description":"A selector of an element to scroll to.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"scrollTo('Get Started')\nscrollTo(link('Get Started'))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"A selector of an element to scroll to."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},{"title":"param","name":"options","default":"{}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"scrollTo","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".scrollTo"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Scrolls the page/element to the right."}]}]},"tags":[{"title":"example","description":"scrollRight()\nscrollRight(1000)\nscrollRight('Element containing text')\nscrollRight('Element containing text', 1000)"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]}},"name":"e","default":"'Window'"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"px","default":"100"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"scrollRight()\nscrollRight(1000)\nscrollRight('Element containing text')\nscrollRight('Element containing text', 1000)"}],"params":[{"title":"param","name":"e","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]},"default":"'Window'"},{"title":"param","name":"px","type":{"type":"NameExpression","name":"number"},"default":"100"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"scrollRight","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".scrollRight"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Scrolls the page/element to the left."}]}]},"tags":[{"title":"example","description":"scrollLeft()\nscrollLeft(1000)\nscrollLeft('Element containing text')\nscrollLeft('Element containing text', 1000)"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]}},"name":"e","default":"'Window'"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"px","default":"100"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"scrollLeft()\nscrollLeft(1000)\nscrollLeft('Element containing text')\nscrollLeft('Element containing text', 1000)"}],"params":[{"title":"param","name":"e","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]},"default":"'Window'"},{"title":"param","name":"px","type":{"type":"NameExpression","name":"number"},"default":"100"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"scrollLeft","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".scrollLeft"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Scrolls up the page/element."}]}]},"tags":[{"title":"example","description":"scrollUp()\nscrollUp(1000)\nscrollUp('Element containing text')\nscrollUp('Element containing text', 1000)"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]}},"name":"e","default":"'Window'"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"px","default":"100"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"scrollUp()\nscrollUp(1000)\nscrollUp('Element containing text')\nscrollUp('Element containing text', 1000)"}],"params":[{"title":"param","name":"e","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]},"default":"'Window'"},{"title":"param","name":"px","type":{"type":"NameExpression","name":"number"},"default":"100"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"scrollUp","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".scrollUp"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Scrolls down the page/element."}]}]},"tags":[{"title":"example","description":"scrollDown()\nscrollDown(1000)\nscrollDown('Element containing text')\nscrollDown('Element containing text', 1000)"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]}},"name":"e","default":"'Window'"},{"title":"param","description":null,"type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"px","default":"100"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"scrollDown()\nscrollDown(1000)\nscrollDown('Element containing text')\nscrollDown('Element containing text', 1000)"}],"params":[{"title":"param","name":"e","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"number"}]},"default":"'Window'"},{"title":"param","name":"px","type":{"type":"NameExpression","name":"number"},"default":"100"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"scrollDown","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".scrollDown"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Captures a screenshot of the page. Appends timeStamp to filename if no filepath given."}]}]},"tags":[{"title":"example","description":"screenshot()\nscreenshot({path : 'screenshot.png'})"},{"title":"param","description":"{path:'screenshot.png'} or {encoding:'base64'}","type":{"type":"NameExpression","name":"object"},"name":"options"},{"title":"returns","description":"Promise which resolves to buffer with captured screenshot if {encoding:'base64} given.","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Buffer"}]}},{"title":"returns","description":"Object with the description of the action performed","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"object"}]}}],"augments":[],"examples":[{"description":"screenshot()\nscreenshot({path : 'screenshot.png'})"}],"params":[{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"{path:'screenshot.png'} or {encoding:'base64'}"}]}]},"type":{"type":"NameExpression","name":"object"},"default":"{}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Promise which resolves to buffer with captured screenshot if {encoding:'base64} given."}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Buffer"}]}},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed"}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"object"}]}}],"sees":[],"throws":[],"name":"screenshot","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".screenshot"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify elements on the web page via XPath or CSS selector."}]}]},"tags":[{"title":"example","description":"highlight($(`//*[text()='text']`))\n$(`//*[text()='text']`).exists()\n$(`#id`)"},{"title":"param","description":"XPath or CSS selector.","type":{"type":"NameExpression","name":"string"},"name":"selector"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"highlight($(`//*[text()='text']`))\n$(`//*[text()='text']`).exists()\n$(`#id`)"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"XPath or CSS selector."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"$","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".$"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify an image on a web page. Typically, this is done via the image's alt text or attribute and value pairs."}]}]},"tags":[{"title":"example","description":"click(image('alt'))\nimage('alt').exists()"},{"title":"param","description":"The image's alt text.","type":{"type":"NameExpression","name":"string"},"name":"alt"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"click(image('alt'))\nimage('alt').exists()"}],"params":[{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}},{"title":"param","name":"alt","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The image's alt text."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"image","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".image"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a link on a web page with text or attribute and value pairs."}]}]},"tags":[{"title":"example","description":"click(link('Get Started'))\nlink('Get Started').exists()"},{"title":"param","description":"The link text.","type":{"type":"NameExpression","name":"string"},"name":"text"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"click(link('Get Started'))\nlink('Get Started').exists()"}],"params":[{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}},{"title":"param","name":"text","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The link text."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"link","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".link"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a list item (HTML "},{"type":"html","value":"
  • "},{"type":"text","value":" element) on a web page with label or attribute and value pairs."}]}]},"tags":[{"title":"example","description":"highlight(listItem('Get Started'))\nlistItem('Get Started').exists()"},{"title":"param","description":"The label of the list item.","type":{"type":"NameExpression","name":"string"},"name":"label"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"highlight(listItem('Get Started'))\nlistItem('Get Started').exists()"}],"params":[{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}},{"title":"param","name":"label","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The label of the list item."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"listItem","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".listItem"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a button on a web page with label or attribute and value pairs."}]}]},"tags":[{"title":"example","description":"highlight(button('Get Started'))\nbutton('Get Started').exists()"},{"title":"param","description":"The button label.","type":{"type":"NameExpression","name":"string"},"name":"label"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"highlight(button('Get Started'))\nbutton('Get Started').exists()"}],"params":[{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}},{"title":"param","name":"label","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The button label."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"button","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".button"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify an input field on a web page with label or attribute and value pairs."}]}]},"tags":[{"title":"example","description":"focus(inputField({'id':'name'})\ninputField({'id': 'name'}).exists()"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"focus(inputField({'id':'name'})\ninputField({'id': 'name'}).exists()"}],"params":[{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"inputField","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".inputField"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a file input field on a web page either with label or with attribute and value pairs."}]}]},"tags":[{"title":"example","description":"fileField('Please select a file:').value()\nfileField('Please select a file:').exists()\nfileField({'id':'file'}).exists()"},{"title":"param","description":"The label (human-visible name) of the file input field.","type":{"type":"NameExpression","name":"string"},"name":"label"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"fileField('Please select a file:').value()\nfileField('Please select a file:').exists()\nfileField({'id':'file'}).exists()"}],"params":[{"title":"param","name":"label","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The label (human-visible name) of the file input field."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"fileField","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".fileField"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a text field on a web page either with label or with attribute and value pairs."}]}]},"tags":[{"title":"example","description":"focus(textField('Username:'))\ntextField('Username:').exists()"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"The label (human-visible name) of the text field.","type":{"type":"NameExpression","name":"string"},"name":"label"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"focus(textField('Username:'))\ntextField('Username:').exists()"}],"params":[{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"label","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The label (human-visible name) of the text field."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"textField","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".textField"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a combo box on a web page either with label or with attribute and value pairs.\nAny value can be selected using value or text of the options."}]}]},"tags":[{"title":"example","description":"comboBox('Vehicle:').select('Car')\ncomboBox('Vehicle:').value()\ncomboBox('Vehicle:').exists()"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attrValuePairs"},{"title":"param","description":"The label (human-visible name) of the combo box.","type":{"type":"NameExpression","name":"string"},"name":"label"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"comboBox('Vehicle:').select('Car')\ncomboBox('Vehicle:').value()\ncomboBox('Vehicle:').exists()"}],"params":[{"title":"param","name":"attrValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}},{"title":"param","name":"label","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The label (human-visible name) of the combo box."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"comboBox","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".comboBox"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a checkbox on a web page either with label or with attribute and value pairs."}]}]},"tags":[{"title":"example","description":"checkBox('Vehicle').check()\ncheckBox('Vehicle').uncheck()\ncheckBox('Vehicle').isChecked()\ncheckBox('Vehicle').exists()"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attributeValuePairs"},{"title":"param","description":"The label (human-visible name) of the check box.","type":{"type":"NameExpression","name":"string"},"name":"label"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"checkBox('Vehicle').check()\ncheckBox('Vehicle').uncheck()\ncheckBox('Vehicle').isChecked()\ncheckBox('Vehicle').exists()"}],"params":[{"title":"param","name":"attrValuePairs"},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}},{"title":"param","name":"attributeValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"label","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The label (human-visible name) of the check box."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"checkBox","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".checkBox"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify a radio button on a web page either with label or with attribute and value pairs."}]}]},"tags":[{"title":"example","description":"radioButton('Vehicle').select()\nradioButton('Vehicle').deselect()\nradioButton('Vehicle').isSelected()\nradioButton('Vehicle').exists()"},{"title":"param","description":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}","type":{"type":"NameExpression","name":"object"},"name":"attributeValuePairs"},{"title":"param","description":"The label (human-visible name) of the radio button.","type":{"type":"NameExpression","name":"string"},"name":"label"},{"title":"param","description":null,"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"radioButton('Vehicle').select()\nradioButton('Vehicle').deselect()\nradioButton('Vehicle').isSelected()\nradioButton('Vehicle').exists()"}],"params":[{"title":"param","name":"attrValuePairs"},{"title":"param","name":"args","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}},{"title":"param","name":"attributeValuePairs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Pairs of attribute and value like {\"id\":\"name\",\"class\":\"class-name\"}"}]}]},"type":{"type":"NameExpression","name":"object"}},{"title":"param","name":"label","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"The label (human-visible name) of the radio button."}]}]},"type":{"type":"NameExpression","name":"string"}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"radioButton","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".radioButton"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify an element with text."}]}]},"tags":[{"title":"example","description":"highlight(text('Vehicle'))\ntext('Vehicle').exists()"},{"title":"param","description":"Text to match.","type":{"type":"NameExpression","name":"string"},"name":"text"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"highlight(text('Vehicle'))\ntext('Vehicle').exists()"}],"params":[{"title":"param","name":"text","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Text to match."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"text","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".text"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"selector","title":null,"jsdoc":true,"children":[{"type":"text","value":"selector"}]},{"type":"text","value":" lets you identify an element containing the text."}]}]},"tags":[{"title":"example","description":"contains('Vehicle').exists()"},{"title":"param","description":"Text to match.","type":{"type":"NameExpression","name":"string"},"name":"text"},{"title":"param","description":"Proximity selectors","type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}},"name":"args"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"ElementWrapper"}}],"augments":[],"examples":[{"description":"contains('Vehicle').exists()"}],"params":[{"title":"param","name":"text","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Text to match."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"args","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Proximity selectors"}]}]},"type":{"type":"RestType","expression":{"type":"NameExpression","name":"relativeSelector"}}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"ElementWrapper"}}],"sees":[],"throws":[],"name":"contains","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".contains"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"relativeSelector","title":null,"jsdoc":true,"children":[{"type":"text","value":"relativeSelector"}]},{"type":"text","value":" lets you perform relative HTML element searches."}]}]},"tags":[{"title":"example","description":"click(link(\"Block\", toLeftOf(\"name\"))"},{"title":"param","description":"Web element selector.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"augments":[],"examples":[{"description":"click(link(\"Block\", toLeftOf(\"name\"))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Web element selector."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"sees":[],"throws":[],"name":"toLeftOf","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".toLeftOf"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"relativeSelector","title":null,"jsdoc":true,"children":[{"type":"text","value":"relativeSelector"}]},{"type":"text","value":" lets you perform relative HTML element searches."}]}]},"tags":[{"title":"example","description":"click(link(\"Block\", toRightOf(\"name\"))"},{"title":"param","description":"Web element selector.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"augments":[],"examples":[{"description":"click(link(\"Block\", toRightOf(\"name\"))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Web element selector."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"sees":[],"throws":[],"name":"toRightOf","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".toRightOf"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"relativeSelector","title":null,"jsdoc":true,"children":[{"type":"text","value":"relativeSelector"}]},{"type":"text","value":" lets you perform relative HTML element searches."}]}]},"tags":[{"title":"example","description":"click(link(\"Block\", above(\"name\"))"},{"title":"param","description":"Web element selector.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"augments":[],"examples":[{"description":"click(link(\"Block\", above(\"name\"))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Web element selector."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"sees":[],"throws":[],"name":"above","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".above"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"relativeSelector","title":null,"jsdoc":true,"children":[{"type":"text","value":"relativeSelector"}]},{"type":"text","value":" lets you perform relative HTML element searches."}]}]},"tags":[{"title":"example","description":"click(link(\"Block\", below(\"name\"))"},{"title":"param","description":"Web element selector.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"augments":[],"examples":[{"description":"click(link(\"Block\", below(\"name\"))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Web element selector."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"sees":[],"throws":[],"name":"below","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".below"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This "},{"type":"link","url":"relativeSelector","title":null,"jsdoc":true,"children":[{"type":"text","value":"relativeSelector"}]},{"type":"text","value":" lets you perform relative HTML element searches."}]}]},"tags":[{"title":"example","description":"click(link(\"Block\", near(\"name\"))"},{"title":"param","description":"Web element selector.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"augments":[],"examples":[{"description":"click(link(\"Block\", near(\"name\"))"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Web element selector."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"sees":[],"throws":[],"name":"near","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".near"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Lets you perform an operation when an "},{"type":"inlineCode","value":"alert"},{"type":"text","value":" with given text is shown."}]}]},"tags":[{"title":"example","description":"alert('Message', async () => await dismiss())"},{"title":"param","description":"Identify alert based on this message.","type":{"type":"NameExpression","name":"string"},"name":"message"},{"title":"param","description":"Operation to perform. Accept/Dismiss","type":{"type":"NameExpression","name":"function"},"name":"callback"}],"augments":[],"examples":[{"description":"alert('Message', async () => await dismiss())"}],"params":[{"title":"param","name":"message","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Identify alert based on this message."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"callback","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Operation to perform. Accept/Dismiss"}]}]},"type":{"type":"NameExpression","name":"function"}}],"properties":[],"returns":[],"sees":[],"throws":[],"name":"alert","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".alert"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Lets you perform an operation when a "},{"type":"inlineCode","value":"prompt"},{"type":"text","value":" with given text is shown."}]}]},"tags":[{"title":"example","description":"prompt('Message', async () => await dismiss())"},{"title":"param","description":"Identify prompt based on this message.","type":{"type":"NameExpression","name":"string"},"name":"message"},{"title":"param","description":"Operation to perform.Accept/Dismiss","type":{"type":"NameExpression","name":"function"},"name":"callback"}],"augments":[],"examples":[{"description":"prompt('Message', async () => await dismiss())"}],"params":[{"title":"param","name":"message","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Identify prompt based on this message."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"callback","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Operation to perform.Accept/Dismiss"}]}]},"type":{"type":"NameExpression","name":"function"}}],"properties":[],"returns":[],"sees":[],"throws":[],"name":"prompt","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".prompt"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Lets you perform an operation when a "},{"type":"inlineCode","value":"confirm"},{"type":"text","value":" with given text is shown."}]}]},"tags":[{"title":"example","description":"confirm('Message', async () => await dismiss())"},{"title":"param","description":"Identify confirm based on this message.","type":{"type":"NameExpression","name":"string"},"name":"message"},{"title":"param","description":"Operation to perform.Accept/Dismiss","type":{"type":"NameExpression","name":"function"},"name":"callback"}],"augments":[],"examples":[{"description":"confirm('Message', async () => await dismiss())"}],"params":[{"title":"param","name":"message","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Identify confirm based on this message."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"callback","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Operation to perform.Accept/Dismiss"}]}]},"type":{"type":"NameExpression","name":"function"}}],"properties":[],"returns":[],"sees":[],"throws":[],"name":"confirm","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".confirm"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Lets you perform an operation when a "},{"type":"inlineCode","value":"beforeunload"},{"type":"text","value":" with given text is shown."}]}]},"tags":[{"title":"example","description":"beforeunload('Message', async () => await dismiss())"},{"title":"param","description":"Identify beforeunload based on this message.","type":{"type":"NameExpression","name":"string"},"name":"message"},{"title":"param","description":"Operation to perform.Accept/Dismiss","type":{"type":"NameExpression","name":"function"},"name":"callback"}],"augments":[],"examples":[{"description":"beforeunload('Message', async () => await dismiss())"}],"params":[{"title":"param","name":"message","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Identify beforeunload based on this message."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"callback","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Operation to perform.Accept/Dismiss"}]}]},"type":{"type":"NameExpression","name":"function"}}],"properties":[],"returns":[],"sees":[],"throws":[],"name":"beforeunload","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".beforeunload"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Add interceptor for the network call to override request or mock response."}]}]},"tags":[{"title":"example","description":"case 1: block url => intercept(url)\ncase 2: mockResponse => intercept(url,{mockObject})\ncase 3: override request => intercept(url,(request) => {request.continue({overrideObject})})\ncase 4: redirect => intercept(url,redirectUrl)\ncase 5: mockResponse based on request => intercept(url,(request) => { request.respond({mockResponseObject})} )"},{"title":"param","description":"request URL to intercept","type":null,"name":"requestUrl"},{"title":"param","description":"action to be done after interception","type":null,"name":"action"},{"title":"returns","description":"Object with the description of the action performed.","type":{"type":"NameExpression","name":"object"}}],"augments":[],"examples":[{"description":"case 1: block url => intercept(url)\ncase 2: mockResponse => intercept(url,{mockObject})\ncase 3: override request => intercept(url,(request) => {request.continue({overrideObject})})\ncase 4: redirect => intercept(url,redirectUrl)\ncase 5: mockResponse based on request => intercept(url,(request) => { request.respond({mockResponseObject})} )"}],"params":[{"title":"param","name":"requestUrl","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"request URL to intercept"}]}]}},{"title":"param","name":"action","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"action to be done after interception"}]}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with the description of the action performed."}]}]},"title":"returns","type":{"type":"NameExpression","name":"object"}}],"sees":[],"throws":[],"name":"intercept","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".intercept"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Evaluates script on element matching the given selector."}]}]},"tags":[{"title":"example","description":"evaluate(link(\"something\"), (element) => element.style.backgroundColor)\nevaluate(()=>{return document.title})"},{"title":"param","description":"Web element selector.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"param","description":"callback method to execute on the element.","type":{"type":"NameExpression","name":"function"},"name":"callback"},{"title":"param","description":"Click options.","type":{"type":"NameExpression","name":"Object"},"name":"options"},{"title":"param","description":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass `{ timeout: 10000 }` in `options` parameter.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"boolean"}},"name":"options.waitForNavigation","default":"true"},{"title":"param","description":"wait for navigation to start. Default to 500ms","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.waitForStart","default":"500"},{"title":"param","description":"Timeout value in milliseconds for navigation after click.","type":{"type":"OptionalType","expression":{"type":"NameExpression","name":"number"}},"name":"options.timeout","default":"5000"},{"title":"returns","description":"Object with description of action performed and return value of callback given","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"augments":[],"examples":[{"description":"evaluate(link(\"something\"), (element) => element.style.backgroundColor)\nevaluate(()=>{return document.title})"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Web element selector."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}},{"title":"param","name":"callback","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"callback method to execute on the element."}]}]},"type":{"type":"NameExpression","name":"function"}},{"title":"param","name":"options","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Click options."}]}]},"type":{"type":"NameExpression","name":"Object"},"properties":[{"title":"param","name":"options.waitForNavigation","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wait for navigation after the click. Default navigation timeout is 15 seconds, to override pass "},{"type":"inlineCode","value":"{ timeout: 10000 }"},{"type":"text","value":" in "},{"type":"inlineCode","value":"options"},{"type":"text","value":" parameter."}]}]},"type":{"type":"NameExpression","name":"boolean"},"default":"true"},{"title":"param","name":"options.waitForStart","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"wait for navigation to start. Default to 500ms"}]}]},"type":{"type":"NameExpression","name":"number"},"default":"500"},{"title":"param","name":"options.timeout","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Timeout value in milliseconds for navigation after click."}]}]},"type":{"type":"NameExpression","name":"number"},"default":"5000"}],"default":"{}"}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Object with description of action performed and return value of callback given"}]}]},"title":"returns","type":{"type":"TypeApplication","expression":{"type":"NameExpression","name":"Promise"},"applications":[{"type":"NameExpression","name":"Object"}]}}],"sees":[],"throws":[],"name":"evaluate","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".evaluate"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Converts seconds to milliseconds."}]}]},"tags":[{"title":"example","description":"link('Plugins').exists(intervalSecs(1))"},{"title":"param","description":"Seconds to convert.","type":{"type":"NameExpression","name":"number"},"name":"secs"},{"title":"return","description":"Milliseconds.","type":{"type":"NameExpression","name":"number"}}],"augments":[],"examples":[{"description":"link('Plugins').exists(intervalSecs(1))"}],"params":[{"title":"param","name":"secs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Seconds to convert."}]}]},"type":{"type":"NameExpression","name":"number"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Milliseconds."}]}]},"title":"returns","type":{"type":"NameExpression","name":"number"}}],"sees":[],"throws":[],"name":"intervalSecs","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".intervalSecs"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Converts seconds to milliseconds."}]}]},"tags":[{"title":"example","description":"link('Plugins').exists(intervalSecs(1), timeoutSecs(10))"},{"title":"param","description":"Seconds to convert.","type":{"type":"NameExpression","name":"number"},"name":"secs"},{"title":"return","description":"Milliseconds.","type":{"type":"NameExpression","name":"number"}}],"augments":[],"examples":[{"description":"link('Plugins').exists(intervalSecs(1), timeoutSecs(10))"}],"params":[{"title":"param","name":"secs","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Seconds to convert."}]}]},"type":{"type":"NameExpression","name":"number"}}],"properties":[],"returns":[{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Milliseconds."}]}]},"title":"returns","type":{"type":"NameExpression","name":"number"}}],"sees":[],"throws":[],"name":"timeoutSecs","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".timeoutSecs"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This function is used to improve the readability. It simply returns the parameter passed into it."}]}]},"tags":[{"title":"example","description":"attach('c:/abc.txt', to('Please select a file:'))"},{"title":"param","description":null,"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"selector"}]},"name":null},{"title":"return","description":null,"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"selector"}]}}],"augments":[],"examples":[{"description":"attach('c:/abc.txt', to('Please select a file:'))"}],"params":[{"title":"param","name":"e"}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"selector"}]}}],"sees":[],"throws":[],"name":"to","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".to"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This function is used to improve the readability. It simply returns the parameter passed into it."}]}]},"tags":[{"title":"example","description":"write(\"user\", into('Username:'))"},{"title":"param","description":null,"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"selector"}]},"name":null},{"title":"return","description":null,"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"selector"}]}}],"augments":[],"examples":[{"description":"write(\"user\", into('Username:'))"}],"params":[{"title":"param","name":"e"}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"string"},{"type":"NameExpression","name":"selector"}]}}],"sees":[],"throws":[],"name":"into","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".into"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"This function is used to wait for number of secs given."}]}]},"tags":[{"title":"example","description":"waitFor(intervalSecs(5))"},{"title":"param","description":null,"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"number"},{"type":"NameExpression","name":"time"}]},"name":null},{"title":"return","description":null,"type":{"type":"NameExpression","name":"promise"}}],"augments":[],"examples":[{"description":"waitFor(intervalSecs(5))"}],"params":[],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"promise"}}],"sees":[],"throws":[],"name":"waitFor","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".waitFor"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Accept callback for dialogs"}]}]},"tags":[],"augments":[],"examples":[],"params":[],"properties":[],"returns":[],"sees":[],"throws":[],"name":"accept","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".accept"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Dismiss callback for dialogs"}]}]},"tags":[],"augments":[],"examples":[],"params":[],"properties":[],"returns":[],"sees":[],"throws":[],"name":"dismiss","kind":"function","memberof":"taiko","scope":"static","members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":".dismiss"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Identifies an element on the page."}]}]},"tags":[{"title":"callback","description":"selector"},{"title":"function","description":null,"name":null},{"title":"example","description":"link('Sign in')\nbutton('Get Started')\n$('#id')\ntext('Home')"},{"title":"param","description":"Text to identify the element.","type":{"type":"NameExpression","name":"string"},"name":"text"},{"title":"param","description":null,"type":{"type":"RestType","expression":{"type":"NameExpression","name":"string"}},"name":"args"}],"augments":[],"examples":[{"description":"link('Sign in')\nbutton('Get Started')\n$('#id')\ntext('Home')"}],"params":[{"title":"param","name":"text","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Text to identify the element."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"param","name":"args","type":{"type":"RestType","expression":{"type":"NameExpression","name":"string"}}}],"properties":[],"returns":[],"sees":[],"throws":[],"kind":"function","name":"selector","type":{"type":"NameExpression","name":"Function"},"members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":"selector"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Lets you perform relative HTML element searches."}]}]},"tags":[{"title":"callback","description":"relativeSelector"},{"title":"function","description":null,"name":null},{"title":"example","description":"near('Home')\ntoLeftOf('Sign in')\ntoRightOf('Get Started')\nabove('Sign in')\nbelow('Home')\nlink('Sign In',near(\"Home\"),toLeftOf(\"Sign Out\")) - Multiple selectors can be used to perform relative search"},{"title":"param","description":"Web element selector.","type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]},"name":"selector"},{"title":"returns","description":null,"type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"augments":[],"examples":[{"description":"near('Home')\ntoLeftOf('Sign in')\ntoRightOf('Get Started')\nabove('Sign in')\nbelow('Home')\nlink('Sign In',near(\"Home\"),toLeftOf(\"Sign Out\")) - Multiple selectors can be used to perform relative search"}],"params":[{"title":"param","name":"selector","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Web element selector."}]}]},"type":{"type":"UnionType","elements":[{"type":"NameExpression","name":"selector"},{"type":"NameExpression","name":"string"}]}}],"properties":[],"returns":[{"description":{"type":"root","children":[]},"title":"returns","type":{"type":"NameExpression","name":"RelativeSearchElement"}}],"sees":[],"throws":[],"kind":"function","name":"relativeSelector","type":{"type":"NameExpression","name":"Function"},"members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":"relativeSelector"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Represents a relative HTML element search. This is returned by "},{"type":"link","url":"relativeSelector","title":null,"jsdoc":true,"children":[{"type":"text","value":"relativeSelector"}]}]}]},"tags":[{"title":"example","description":"// returns RelativeSearchElement\nabove('username')"},{"title":"typedef","description":null,"type":{"type":"NameExpression","name":"Object"},"name":"RelativeSearchElement"}],"augments":[],"examples":[{"description":"// returns RelativeSearchElement\nabove('username')"}],"params":[],"properties":[],"returns":[],"sees":[],"throws":[],"kind":"typedef","name":"RelativeSearchElement","type":{"type":"NameExpression","name":"Object"},"constructorComment":{"description":"","tags":[{"title":"class","description":null,"type":null,"name":null},{"title":"ignore","description":null}],"augments":[],"examples":[],"params":[],"properties":[],"returns":[],"sees":[],"throws":[],"kind":"class","ignore":true},"members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":"RelativeSearchElement"},{"description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Wrapper object for the element present on the web page. Extra methods are avaliable based on the element type."}]},{"type":"list","ordered":false,"start":null,"children":[{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"inlineCode","value":"get()"},{"type":"text","value":", "},{"type":"inlineCode","value":"exists()"},{"type":"text","value":", "},{"type":"inlineCode","value":"description"},{"type":"text","value":", text() for all the elements."}]}]},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"inlineCode","value":"value()"},{"type":"text","value":" for input field, fileField and text field."}]}]},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"inlineCode","value":"value()"},{"type":"text","value":", "},{"type":"inlineCode","value":"select()"},{"type":"text","value":" for combo box."}]}]},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"inlineCode","value":"check()"},{"type":"text","value":", "},{"type":"inlineCode","value":"uncheck()"},{"type":"text","value":", "},{"type":"inlineCode","value":"isChecked()"},{"type":"text","value":" for checkbox."}]}]},{"type":"listItem","children":[{"type":"paragraph","children":[{"type":"inlineCode","value":"select()"},{"type":"text","value":", "},{"type":"inlineCode","value":"deselect()"},{"type":"text","value":", "},{"type":"inlineCode","value":"isSelected()"},{"type":"text","value":" for radio button."}]}]}]}]},"tags":[{"title":"typedef","description":null,"type":{"type":"NameExpression","name":"Object"},"name":"ElementWrapper"},{"title":"property","description":"@private {function} get - DOM element getter. Implicitly wait for the element to appears with timeout of 10 seconds.","type":null,"name":"null"},{"title":"property","description":"Checks existence for element.","type":{"type":"FunctionType","params":[{"type":"NameExpression","name":"number"},{"type":"NameExpression","name":"number"}],"result":null},"name":"exists"},{"title":"property","description":"Describing the operation performed.","type":{"type":"NameExpression","name":"string"},"name":"description"},{"title":"property","description":"Gives innerText of all matching elements.","type":{"type":"NameExpression","name":"Array"},"name":"text"},{"title":"example","description":"link('google').exists()\nlink('google').exists(intervalSecs(1), timeoutSecs(10))\nlink('google').description\ntextField('username').value()\n$('.class').text()"}],"augments":[],"examples":[{"description":"link('google').exists()\nlink('google').exists(intervalSecs(1), timeoutSecs(10))\nlink('google').description\ntextField('username').value()\n$('.class').text()"}],"params":[],"properties":[{"title":"property","name":"exists","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Checks existence for element."}]}]},"type":{"type":"FunctionType","params":[{"type":"NameExpression","name":"number"},{"type":"NameExpression","name":"number"}],"result":null}},{"title":"property","name":"description","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Describing the operation performed."}]}]},"type":{"type":"NameExpression","name":"string"}},{"title":"property","name":"text","description":{"type":"root","children":[{"type":"paragraph","children":[{"type":"text","value":"Gives innerText of all matching elements."}]}]},"type":{"type":"NameExpression","name":"Array"}}],"returns":[],"sees":[],"throws":[],"kind":"typedef","name":"ElementWrapper","type":{"type":"NameExpression","name":"Object"},"members":{"global":[],"inner":[],"instance":[],"events":[],"static":[]},"namespace":"ElementWrapper"}] \ No newline at end of file diff --git a/lib/taiko.js b/lib/taiko.js index cc7c45f86..f4e4e86bc 100644 --- a/lib/taiko.js +++ b/lib/taiko.js @@ -42,13 +42,13 @@ const connect_to_cri = async (target) => { await inputHandler.setInput(input); await domHandler.setDOM(dom); await targetHandler.setTarget(criTarget, xhrEvent, connect_to_cri, currentHost, currentPort); - await pageHandler.setPage(page, xhrEvent, async function() { + await pageHandler.setPage(page, xhrEvent, async function () { if (!client) return; rootId = null; const { root: { nodeId } } = await dom.getDocument(); rootId = nodeId; }); - if(ignoreSSLErrors) security.setIgnoreCertificateErrors({ignore:true}); + if (ignoreSSLErrors) security.setIgnoreCertificateErrors({ ignore: true }); resolve(); }); } catch (e) { setTimeout(() => { connect(resolve); }, 1000).unref(); } @@ -62,19 +62,19 @@ const connect_to_cri = async (target) => { * openBrowser() * openBrowser({ headless: false }) * openBrowser({args:['--window-size=1440,900']}) - * openBrowser({args: [ + * openBrowser({args: [ * '--disable-gpu', * '--disable-dev-shm-usage', * '--disable-setuid-sandbox', * '--no-first-run', * '--no-sandbox', * '--no-zygote']}) - These are recommended args that has to be passed when running in docker - * - * @param {Object} options {headless: true|false, args:['--window-size=1440,900']} + * + * @param {Object} options {headless: true|false, args:['--window-size=1440,900']} * @param {boolean} [options.headless=true] - Option to let open browser in headless/headful mode. * @param {Array} [options.args] - Args to open chromium https://peter.sh/experiments/chromium-command-line-switches/. * @param {number} [options.port=0] - Remote debugging port if not given connects to any open port. - * @param {boolean} [options.ignoreCertificateErrors=false] - Option to ignore certificate errors. + * @param {boolean} [options.ignoreCertificateErrors=false] - Option to ignore certificate errors. * @returns {Promise} - Object with the description of the action performed. */ module.exports.openBrowser = async (options = { headless: true }) => { @@ -127,7 +127,7 @@ const _closeBrowser = async () => { if (temporaryUserDataDir) { try { await removeFolderAsync(temporaryUserDataDir); - } catch (e) {} + } catch (e) { } } }); }; @@ -135,17 +135,17 @@ const _closeBrowser = async () => { /** * Gives CRI client object. * - * @returns {Object} + * @returns {Object} */ module.exports.client = () => client; /** * Allows to switch between tabs using URL or page title. - * + * * @example * switchTo('https://taiko.gauge.org/') - switch using URL * switchTo('Taiko') - switch using Title - * + * * @param {string} targetUrl - URL/Page title of the tab to switch. * @returns {Promise} - Object with the description of the action performed. */ @@ -159,10 +159,10 @@ module.exports.switchTo = async (targetUrl) => { /** * Sets page viewport - * + * * @example - * setViewPort({width:600,height:800}) - * + * setViewPort({width:600,height:800}) + * * @param {Object} options - https://chromedevtools.github.io/devtools-protocol/tot/Emulation#method-setDeviceMetricsOverride * @returns {Promise} - Object with the description of the action performed. */ @@ -201,7 +201,7 @@ module.exports.openTab = async (targetUrl, options = { timeout: 30000 }) => { * @example * closeTab() - Closes the current tab. * closeTab('https://gauge.org') - Closes the tab with url 'https://gauge.org'. - * + * * @param {string} targetUrl - URL/Page title of the tab to switch. * @returns {Promise} - Object with the description of the action performed. */ @@ -241,7 +241,7 @@ module.exports.goto = async (url, options = { timeout: 30000 }) => { xhrEvent.addListener('xhrEvent', func); if (options.headers) await network.setExtraHTTPHeaders({ headers: options.headers }); const res = await page.navigate({ url: url }); - if(res.errorText) throw new Error(`Navigation to url ${url} failed.\n REASON: ${res.errorText}`); + if (res.errorText) throw new Error(`Navigation to url ${url} failed.\n REASON: ${res.errorText}`); await waitForNavigation(options.timeout, promises).catch(handleTimeout(func, options.timeout)); xhrEvent.removeListener('xhrEvent', func); return { description: `Navigated to url "${url}"`, url: url }; @@ -253,8 +253,8 @@ module.exports.goto = async (url, options = { timeout: 30000 }) => { * @example * reload('https://google.com') * reload('https://google.com', { timeout: 10000 }) - * - * @param {string} url - URL to reload + * + * @param {string} url - URL to reload * @returns {Promise} - Object with the description of the action performed and the final URL. */ module.exports.reload = async (url) => { @@ -571,7 +571,7 @@ const isPasswordField = async () => { const result = await runtime.evaluate({ expression: 'document.activeElement.type' }); - return (result.result.value === 'password'); + return (result.result.value === 'password'); }; const _getActiveElementTagName = async () => { @@ -597,7 +597,7 @@ const _getActiveElementDisabled = async () => { const _isActiveFieldNotWritable = async () => { return (['INPUT', 'TEXTAREA', 'SELECT'].indexOf((await _getActiveElementTagName())) <= -1 || - await _getActiveElementIsContentEditable()) && + await _getActiveElementIsContentEditable()) && await _getActiveElementDisabled(); }; @@ -623,12 +623,12 @@ const _getDocumentUrl = async () => { }; /** - * Clears the value of given selector. If no selector is given clears the current active element. - * + * Clears the value of given selector. If no selector is given clears the current active element. + * * @example * clear() * clear(inputField({placeholder:'Email'})) - * + * * @param {selector} selector - A selector to search for element to clear. If there are multiple elements satisfying the selector, the first will be cleared. * @param {Object} options - Click options. * @param {boolean} [options.waitForNavigation=true] - Wait for navigation after clear. Default navigation timeout is 15 seconds, to override pass `{ timeout: 10000 }` in `options` parameter. @@ -636,15 +636,15 @@ const _getDocumentUrl = async () => { * @param {number} [options.timeout=5000] - Timeout value in milliseconds for navigation after click. * @returns {Promise} - Object with the description of the action performed. */ -module.exports.clear = async (selector,options={}) => { - let nodeId,desc; +module.exports.clear = async (selector, options = {}) => { + let nodeId, desc; options = setNavigationOptions(options); - if(!selector) { + if (!selector) { const result = await runtime.evaluate({ expression: 'document.activeElement' }); const res = await dom.requestNode({ objectId: result.result.objectId }); nodeId = res.nodeId; - desc = { description: 'Cleared element on focus'}; - }else { + desc = { description: 'Cleared element on focus' }; + } else { nodeId = await element(selector); desc = { description: 'Cleared ' + description(selector, true) }; } @@ -656,7 +656,7 @@ module.exports.clear = async (selector,options={}) => { }; const _clear = async (elem) => { - await click(elem,{clickCount:3,waitForNavigation:false}); + await click(elem, { clickCount: 3, waitForNavigation: false }); await inputHandler.down('Backspace'); await inputHandler.up('Backspace'); }; @@ -692,13 +692,14 @@ module.exports.attach = async (filepath, to) => { }; /** - * Presses the given key. + * Presses the given keys. * * @example * press('Enter') * press('a') + * press(['Shift', 'ArrowLeft', 'ArrowLeft']) * - * @param {string} key - Name of key to press, such as ArrowLeft. See [USKeyboardLayout](https://github.com/getgauge/taiko/blob/master/lib/USKeyboardLayout.js) for a list of all key names. + * @param {string | Array } keys - Name of keys to press, such as ArrowLeft. See [USKeyboardLayout](https://github.com/getgauge/taiko/blob/master/lib/USKeyboardLayout.js) for a list of all key names. * @param {Object} options * @param {string} [options.text] - If specified, generates an input event with this text. * @param {number} [options.delay=0] - Time to wait between keydown and keyup in milliseconds. @@ -707,16 +708,22 @@ module.exports.attach = async (filepath, to) => { * @param {number} [options.timeout=5000] - Timeout value in milliseconds for navigation after click. * @returns {Promise} - Object with the description of the action performed. */ -module.exports.press = async (key, options = {}) => { +module.exports.press = async (keys, options = {}) => { validate(); options = setNavigationOptions(options); + return await _press(new Array().concat(keys), options); +}; + +async function _press(keys, options) { await doActionAwaitingNavigation(options, async () => { - await inputHandler.down(key, options); + for (let i = 0; i < keys.length; i++) await inputHandler.down(keys[i], options); if (options && options.delay) await new Promise(f => setTimeout(f, options.delay).unref()); - await inputHandler.up(key); + keys = keys.reverse(); + for (let i = 0; i < keys.length; i++) await inputHandler.up(keys[i]); }); - return { description: `Pressed the ${key} key` }; -}; + return { description: `Pressed the ${keys.reverse().join(' + ')} key` }; +} + /** * Highlights the given element on the page by drawing a red rectangle around it. This is useful for debugging purposes. @@ -1452,14 +1459,14 @@ module.exports.beforeunload = (message, callback) => dialog('beforeunload', mess /** * Add interceptor for the network call to override request or mock response. - * + * * @example * case 1: block url => intercept(url) * case 2: mockResponse => intercept(url,{mockObject}) * case 3: override request => intercept(url,(request) => {request.continue({overrideObject})}) * case 4: redirect => intercept(url,redirectUrl) * case 5: mockResponse based on request => intercept(url,(request) => { request.respond({mockResponseObject})} ) - * + * * @param requestUrl request URL to intercept * @param action action to be done after interception * @returns {object} Object with the description of the action performed. @@ -1471,11 +1478,11 @@ module.exports.intercept = async (requestUrl, action) => { /** * Evaluates script on element matching the given selector. - * + * * @example * evaluate(link("something"), (element) => element.style.backgroundColor) * evaluate(()=>{return document.title}) - * + * * @param {selector|string} selector - Web element selector. * @param {function} callback - callback method to execute on the element. * @param {Object} options - Click options. @@ -1486,10 +1493,10 @@ module.exports.intercept = async (requestUrl, action) => { */ module.exports.evaluate = async (selector, callback, options = {}) => { let result; - if(isFunction(selector)){ + if (isFunction(selector)) { callback = selector; selector = (await $$xpath('//*'))[0]; - } + } const nodeId = isNaN(selector) ? await element(selector) : selector; if (headful) await highlightElemOnAction(nodeId); @@ -1508,7 +1515,7 @@ module.exports.evaluate = async (selector, callback, options = {}) => { objectId }); }); - return {description:'Evaluated given script. Result: ' + result.result.value, result: result.result.value}; + return { description: 'Evaluated given script. Result: ' + result.result.value, result: result.result.value }; }; /** @@ -1615,7 +1622,7 @@ const doActionAwaitingNavigation = async (options, action) => { await waitForPromises(promises, options.waitForStart); if (options.awaitNavigation) { //TODO:Handle frame load without loadEventFired - await waitForNavigation(options.timeout, promises).catch(() => {}); + await waitForNavigation(options.timeout, promises).catch(() => { }); } xhrEvent.removeAllListeners(); }; @@ -1797,7 +1804,7 @@ const waitUntil = async (condition, intervalTime, timeout) => { while (true) { try { if (await condition()) break; - } catch (e) {} + } catch (e) { } if ((new Date().getTime() - start) > timeout) throw new Error(`waiting failed: timeout ${timeout}ms exceeded`); sleep(intervalTime); @@ -1837,7 +1844,7 @@ const getMatchingNode = async (elements, args) => { } if (valid) matchingNodes.push({ element: element, dist: dist }); } - matchingNodes.sort(function(a, b) { + matchingNodes.sort(function (a, b) { return a.dist - b.dist; }); return matchingNodes;