{"id":24753860,"url":"https://github.com/codeceptjs/detox-helper","last_synced_at":"2025-07-08T18:09:17.427Z","repository":{"id":37981827,"uuid":"190907375","full_name":"codeceptjs/detox-helper","owner":"codeceptjs","description":"Detox helper for CodeceptJS https://codecept.io","archived":false,"fork":false,"pushed_at":"2025-06-02T09:18:03.000Z","size":174969,"stargazers_count":18,"open_issues_count":5,"forks_count":20,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-06-08T06:27:40.036Z","etag":null,"topics":["detox","end-to-end-testing","mobile-testing"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeceptjs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-06-08T16:00:10.000Z","updated_at":"2025-04-11T09:34:44.000Z","dependencies_parsed_at":"2024-02-19T15:12:29.962Z","dependency_job_id":"3677a639-cb13-4e94-bb94-369a64eefbc4","html_url":"https://github.com/codeceptjs/detox-helper","commit_stats":{"total_commits":126,"total_committers":11,"mean_commits":"11.454545454545455","dds":0.5158730158730158,"last_synced_commit":"5d127328972ca59de66c08177fb2b62a5a771531"},"previous_names":["codeception/detox-helper"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/codeceptjs/detox-helper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeceptjs%2Fdetox-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeceptjs%2Fdetox-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeceptjs%2Fdetox-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeceptjs%2Fdetox-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeceptjs","download_url":"https://codeload.github.com/codeceptjs/detox-helper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeceptjs%2Fdetox-helper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260006034,"owners_count":22944868,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["detox","end-to-end-testing","mobile-testing"],"created_at":"2025-01-28T11:36:36.466Z","updated_at":"2025-07-08T18:09:17.404Z","avatar_url":"https://github.com/codeceptjs.png","language":"JavaScript","readme":"[![Publish npm Package](https://github.com/codeceptjs/detox-helper/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/codeceptjs/detox-helper/actions/workflows/npm-publish.yml) [![e2e-ios](https://github.com/codeceptjs/detox-helper/actions/workflows/e2e-ios.yml/badge.svg)](https://github.com/codeceptjs/detox-helper/actions/workflows/e2e-ios.yml)\n\n# [Detox](https://github.com/wix/Detox) Helper for [CodeceptJS](https://codecept.io)\n\nTesting Mobile Apps on iOS and Android can look like this:\n\n```js\nI.setLandscapeOrientation();\nI.fillField('#text', 'a new text');\nI.see('a new text', '#textValue');\nI.dontSeeElement('#createdAndVisibleText');\nI.click({ ios: '#GoButton', android: 'Button' });\nI.waitForElement('#createdAndVisibleText', 20);\nI.seeElement('#createdAndVisibleText');\nI.runOnAndroid(() =\u003e {\n  I.click('Save');\n  I.see('Text Saved', '#message');\n});\nI.runOnIOS(() =\u003e {\n  I.click('SAVE');\n  I.see('SAVED!');\n});\n```\n\nExample output:\n\n```bash\ncreating output directory: /Users/runner/work/detox-helper/detox-helper/test/output\n***************************************\nnodeInfo:  20.14.0\nosInfo:  macOS 14.5\ncpuInfo:  (3) arm64 Apple M1 (Virtual)\nchromeInfo:  125.0.6422.142\nedgeInfo:  Not Found\nfirefoxInfo:  undefined\nsafariInfo:  17.5\nIf you need more detailed info, just run this: npx codeceptjs info\n***************************************\nCodeceptJS v3.6.3 #StandWithUkraine\nUsing test root \"/Users/runner/work/detox-helper/detox-helper/test\"\nHelpers: Detox, ExpectHelper\nPlugins: screenshotOnFail\n\n    Acceptance Tests --\n        [1]  Starting recording promises\n        Timeouts: \n    11:44:06.770 detox[8813] i   App started\n    11:44:28.445 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:\n            /usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == \"example\"'\n    11:44:28.557 detox[8813] i     --- STARTED \"before each\" hook: Before for \"App started\" ---\n    11:44:28.583 detox[8813] i     I launch app \n    11:44:30.037 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:\n            /usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == \"example\"'\n    11:44:30.043 detox[8813] i     I wait for element visible \"#hello_button\", 15\n    11:44:31.253 detox[8813] i     --- ENDED \"before each\" hook: Before for \"App started\" ---\n    11:44:31.273 detox[8813] i     I see \"Welcome\"\n    11:44:31.289 detox[8813] i   ✔ OK in 25ms\n    11:44:31.289 detox[8813] i \n    11:44:31.301 detox[8813] i   Get platform\n    11:44:34.736 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:\n            /usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == \"example\"'\n    11:44:40.582 detox[8813] i     --- STARTED \"before each\" hook: Before for \"Get platform\" ---\n    11:44:40.588 detox[8813] i     I launch app \n    11:44:42.271 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:\n            /usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == \"example\"'\n    11:44:42.274 detox[8813] i     I wait for element visible \"#hello_button\", 15\n    11:44:43.126 detox[8813] i     --- ENDED \"before each\" hook: Before for \"Get platform\" ---\n    11:44:43.150 detox[8813] i     I grab platform \n    11:44:43.152 detox[8813] i     I expect \"\"ios\"\" to equal \"\"ios\"\"\n    11:44:43.158 detox[8813] i   ✔ OK in 31ms\n    11:44:43.158 detox[8813] i \n    11:44:43.166 detox[8813] i   Show hello screen after tap\n    11:44:46.251 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:\n            /usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == \"example\"'\n    11:44:52.308 detox[8813] i     --- STARTED \"before each\" hook: Before for \"Show hello screen after tap\" ---\n    11:44:52.321 detox[8813] i     I launch app \n    11:47:22.243 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:\n            /usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == \"example\"'\n    11:47:22.319 detox[8813] i     I wait for element visible \"#hello_button\", 15\n    11:47:23.637 detox[8813] i     --- ENDED \"before each\" hook: Before for \"Show hello screen after tap\" ---\n    11:47:23.668 detox[8813] i     I dont see \"Hello!!!\"\n    11:47:23.699 detox[8813] i     I click \"#hello_button\"\n    11:47:24.308 detox[8813] i     I see \"Hello!!!\"\n    11:47:24.323 detox[8813] i   ✔ OK in 684ms\n    11:47:24.323 detox[8813] i \n    11:47:24.334 detox[8813] i   Show world screen after tap\n    11:47:27.298 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:\n            /usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == \"example\"'\n    11:47:33.604 detox[8813] i     --- STARTED \"before each\" hook: Before for \"Show world screen after tap\" ---\n    11:47:33.608 detox[8813] i     I launch app \n    11:47:36.074 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:\n            /usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == \"example\"'\n    11:47:36.110 detox[8813] i     I wait for element visible \"#hello_button\", 15\n    11:47:36.450 detox[8813] i     --- ENDED \"before each\" hook: Before for \"Show world screen after tap\" ---\n    11:47:36.452 detox[8813] i     I click \"#world_button\"\n    11:47:37.314 detox[8813] i     I see \"World!!!\"\n    11:47:37.408 detox[8813] i   ✔ OK in 935ms\n    11:47:37.409 detox[8813] i \n    11:47:37.468 detox[8813] i \n    11:47:37.470 detox[8813] i   OK  | 4 passed   // 7m\n```\n\nCodeceptJS provides next features over standard Detox:\n\n-   **Unified API**. The same test can be executed in Appium or Detox. Unified API helps different teams to use the same syntax and easy port tests from one engine to another.\n-   **Interactive pause**. When starting/stopping an application takes a long time, debugging and writing tests can be hard. \n    CodeceptJS solves this by pausing an execution and letting you try different commands and locators. With this feature a test can be writtern during one running session.\n-   **One Test For Android and IOS**. When application differs on Android and IOS you can provide corresponding system-related locators for both systems. When needed a different code can be executed for Android and IOS keeping it inside the same test.\n\n## API\n\n\u003c!-- Generated by documentation.js. Update this documentation by updating the source code. --\u003e\n\n#### Table of Contents\n\n-   [Detox](#detox)\n    -   [Setup](#setup)\n    -   [Configuration](#configuration)\n    -   [Parameters](#parameters)\n    -   [saveScreenshot](#savescreenshot)\n        -   [Parameters](#parameters-1)\n    -   [relaunchApp](#relaunchapp)\n    -   [launchApp](#launchapp)\n    -   [installApp](#installapp)\n    -   [shakeDevice](#shakedevice)\n    -   [goBack](#goback)\n    -   [setLandscapeOrientation](#setlandscapeorientation)\n    -   [setPortraitOrientation](#setportraitorientation)\n    -   [grabPlatform](#grabplatform)\n    -   [runOnIOS](#runonios)\n        -   [Parameters](#parameters-2)\n    -   [runOnAndroid](#runonandroid)\n        -   [Parameters](#parameters-3)\n    -   [tap](#tap)\n        -   [Parameters](#parameters-4)\n    -   [multiTap](#multitap)\n        -   [Parameters](#parameters-5)\n    -   [longPress](#longpress)\n        -   [Parameters](#parameters-6)\n    -   [click](#click)\n        -   [Parameters](#parameters-7)\n    -   [tapByLabel](#tapbylabel)\n        -   [Parameters](#parameters-8)\n    -   [clickAtPoint](#clickatpoint)\n        -   [Parameters](#parameters-9)\n    -   [see](#see)\n        -   [Parameters](#parameters-10)\n    -   [dontSee](#dontsee)\n        -   [Parameters](#parameters-11)\n    -   [seeElement](#seeelement)\n        -   [Parameters](#parameters-12)\n    -   [checkIfElementExists](#checkifelementexists)\n        -   [Parameters](#parameters-13)\n    -   [dontSeeElement](#dontseeelement)\n        -   [Parameters](#parameters-14)\n    -   [seeElementExists](#seeelementexists)\n        -   [Parameters](#parameters-15)\n    -   [dontSeeElementExists](#dontseeelementexists)\n        -   [Parameters](#parameters-16)\n    -   [fillField](#fillfield)\n        -   [Parameters](#parameters-17)\n    -   [tapReturnKey](#tapreturnkey)\n        -   [Parameters](#parameters-18)\n    -   [clearField](#clearfield)\n        -   [Parameters](#parameters-19)\n    -   [appendField](#appendfield)\n        -   [Parameters](#parameters-20)\n    -   [scrollUp](#scrollup)\n        -   [Parameters](#parameters-21)\n    -   [scrollDown](#scrolldown)\n        -   [Parameters](#parameters-22)\n    -   [scrollLeft](#scrollleft)\n        -   [Parameters](#parameters-23)\n    -   [scrollRight](#scrollright)\n        -   [Parameters](#parameters-24)\n    -   [swipeUp](#swipeup)\n        -   [Parameters](#parameters-25)\n    -   [swipeDown](#swipedown)\n        -   [Parameters](#parameters-26)\n    -   [swipeLeft](#swipeleft)\n        -   [Parameters](#parameters-27)\n    -   [swipeRight](#swiperight)\n        -   [Parameters](#parameters-28)\n    -   [wait](#wait)\n        -   [Parameters](#parameters-29)\n    -   [waitForElement](#waitforelement)\n        -   [Parameters](#parameters-30)\n    -   [waitForElementVisible](#waitforelementvisible)\n        -   [Parameters](#parameters-31)\n    -   [waitToHide](#waittohide)\n        -   [Parameters](#parameters-32)\n    -   [scrollToElement](#scrolltoelement)\n        -   [Parameters](#parameters-33)\n\n### Detox\n\n**Extends Helper**\n\nThis is a wrapper on top of [Detox](https://github.com/wix/Detox) library, aimied to unify testing experience for CodeceptJS framework.\nDetox provides a grey box testing for mobile applications, playing especially good for React Native apps.\n\nDetox plays quite differently from Appium. To establish detox testing you need to build a mobile application in a special way to inject Detox code.\nThis why **Detox is grey box testing** solution, so you need access to application source code, and a way to build and execute it on emulator.\n\nComparing to Appium, Detox runs faster and more stable but requires an additional setup for build.\n\n#### Setup\n\n1.  [Install and configure Detox](https://wix.github.io/Detox/docs/introduction/project-setup)\n2.  [Build an application](https://wix.github.io/Detox/docs/introduction/project-setup#step-5-build-the-app) using `detox build` command.\n3.  Install [CodeceptJS](https://codecept.io) and detox-helper:\n\n\n    npm i @codeceptjs/detox-helper --save\n\nDetox configuration is required in `package.json` under `detox` section.\n\nIf you completed step 1 and step 2 you should have a configuration similar this:\n\n```js\n \"detox\": {\n    \"configurations\": {\n      \"ios.sim.debug\": {\n        \"device\": \"simulator\",\n        \"app\": \"ios.debug\"\n      }\n    },\n    \"apps\": {\n      \"ios.debug\": {\n        \"type\": \"ios.app\",\n        \"binaryPath\": \"../test/ios/build/Build/Products/Debug-iphonesimulator/MyTestApp.app\",\n        \"build\": \"xcodebuild -workspace ../test/ios/MyTestApp.xcworkspace -scheme MyTestApp -configuration Debug -sdk iphonesimulator -derivedDataPath ../test/ios/build\"\n      }\n    },\n    \"devices\": {\n      \"simulator\": {\n        \"type\": \"ios.simulator\",\n        \"device\": {\n          \"type\": \"iPhone 15\"\n        }\n      }\n    }\n  }\n```\n\n#### Configuration\n\nBesides Detox configuration, CodeceptJS should also be configured to use Detox.\n\nIn `codecept.conf.js` enable Detox helper:\n\n```js\nhelpers: {\n   Detox: {\n     require: '@codeceptjs/detox-helper',\n     configuration: '\u003cdetox-configuration-name\u003e',\n   }\n}\n```\n\nIt's important to specify a package name under `require` section and current detox configuration taken from `package.json`.\n\nOptions:\n\n-   `configuration` - a detox configuration name. Required.\n-   `reloadReactNative` - should be enabled for React Native applications.\n-   `reuse` - reuse application for tests. By default, Detox reinstalls and relaunches app.\n-   `registerGlobals` - (default: true) Register Detox helper functions `by`, `element`, `expect`, `waitFor` globally.\n-   `url` - URL to open via deep-link each time the app is launched (android) or immediately afterwards (iOS). Useful for opening a bundle URL at the beginning of tests when working with Expo.\n\n#### Parameters\n\n-   `config`  \n\n#### saveScreenshot\n\nSaves a screenshot to the output dir\n\n```js\nI.saveScreenshot('main-window.png');\n```\n\n##### Parameters\n\n-   `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** \n\n#### relaunchApp\n\nRelaunches an application.\n\n```js\nI.relaunchApp();\n```\n\n#### launchApp\n\nLaunches an application. If application instance already exists, use [relaunchApp](#relaunchApp).\n\n```js\nI.launchApp();\n```\n\n#### installApp\n\nInstalls a configured application.\nApplication is installed by default.\n\n```js\nI.installApp();\n```\n\n#### shakeDevice\n\nShakes the device.\n\n```js\nI.shakeDevice();\n```\n\n#### goBack\n\nGoes back on Android\n\n```js\nI.goBack(); // on Android only\n```\n\n#### setLandscapeOrientation\n\nSwitches device to landscape orientation\n\n```js\nI.setLandscapeOrientation();\n```\n\n#### setPortraitOrientation\n\nSwitches device to portrait orientation\n\n```js\nI.setPortraitOrientation();\n```\n\n#### grabPlatform\n\nGrab the device platform\n\n```js\nconst platform = await I.grabPlatform();\n```\n\n#### runOnIOS\n\nExecute code only on iOS\n\n```js\nI.runOnIOS(() =\u003e {\n   I.click('Button');\n   I.see('Hi, IOS');\n});\n```\n\n##### Parameters\n\n-   `fn` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** a function which will be executed on iOS\n\n#### runOnAndroid\n\nExecute code only on Android\n\n```js\nI.runOnAndroid(() =\u003e {\n   I.click('Button');\n   I.see('Hi, Android');\n});\n```\n\n##### Parameters\n\n-   `fn` **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** a function which will be executed on android\n\n#### tap\n\nTaps on an element.\nElement can be located by its text or id or accessibility id.\n\nThe second parameter is a context element to narrow the search.\n\nSame as [click](#click)\n\n```js\nI.tap('Login'); // locate by text\nI.tap('~nav-1'); // locate by accessibility label\nI.tap('#user'); // locate by id\nI.tap('Login', '#nav'); // locate by text inside #nav\nI.tap({ ios: 'Save', android: 'SAVE' }, '#main'); // different texts on iOS and Android\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** \n-   `context` **(CodeceptJS.LocatorOrString | null)**  (optional, default `null`)\n\n#### multiTap\n\nMulti taps on an element.\nElement can be located by its text or id or accessibility id.\n\nSet the number of taps in second argument.\nOptionally define the context element by third argument.\n\n```js\nI.multiTap('Login', 2); // locate by text\nI.multiTap('~nav', 2); // locate by accessibility label\nI.multiTap('#user', 2); // locate by id\nI.multiTap('Update', 2, '#menu'); // locate by id\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** element to locate\n-   `num` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** number of taps\n-   `context` **(CodeceptJS.LocatorOrString | null)** context element (optional, default `null`)\n\n#### longPress\n\nTaps an element and holds for a requested time.\n\n```js\nI.longPress('Login', 2); // locate by text, hold for 2 seconds\nI.longPress('~nav', 1); // locate by accessibility label, hold for second\nI.longPress('Update', 2, '#menu'); // locate by text inside #menu, hold for 2 seconds\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** element to locate\n-   `sec` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** number of seconds to hold tap\n-   `context` **(CodeceptJS.LocatorOrString | null)** context element (optional, default `null`)\n\n#### click\n\nClicks on an element.\nElement can be located by its text or id or accessibility id\n\nThe second parameter is a context (id | type | accessibility id) to narrow the search.\n\nSame as [tap](#tap)\n\n```js\nI.click('Login'); // locate by text\nI.click('~nav-1'); // locate by accessibility label\nI.click('#user'); // locate by id\nI.click('Login', '#nav'); // locate by text inside #nav\nI.click({ ios: 'Save', android: 'SAVE' }, '#main'); // different texts on iOS and Android\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** \n-   `context` **(CodeceptJS.LocatorOrString | null)**  (optional, default `null`)\n\n#### tapByLabel\n\nClicks on an element.\nElement can be located by its label\n\nThe second parameter is a context (id | type | accessibility id) to narrow the search.\n\n```js\nI.tapByLabel('Login'); // locate by text\nI.tapByLabel('Login', '#nav'); // locate by text inside #nav\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** \n-   `context` **(CodeceptJS.LocatorOrString | null)**  (optional, default `null`)\n\n#### clickAtPoint\n\nPerforms click on element with horizontal and vertical offset.\nAn element is located by text, id, accessibility id.\n\n```js\nI.clickAtPoint('Save', 10, 10);\nI.clickAtPoint('~save', 10, 10); // locate by accessibility id\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** \n-   `x` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** horizontal offset (optional, default `0`)\n-   `y` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** vertical offset (optional, default `0`)\n\n#### see\n\nChecks text to be visible.\nUse second parameter to narrow down the search.\n\n```js\nI.see('Record created');\nI.see('Record updated', '#message');\nI.see('Record deleted', '~message');\n```\n\n##### Parameters\n\n-   `text` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** to check visibility\n-   `context` **(CodeceptJS.LocatorOrString | null)** element inside which to search for text (optional, default `null`)\n\n#### dontSee\n\nChecks text not to be visible.\nUse second parameter to narrow down the search.\n\n```js\nI.dontSee('Record created');\nI.dontSee('Record updated', '#message');\nI.dontSee('Record deleted', '~message');\n```\n\n##### Parameters\n\n-   `text` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** to check invisibility\n-   `context` **(CodeceptJS.LocatorOrString | null)** element in which to search for text (optional, default `null`)\n\n#### seeElement\n\nChecks for visibility of an element.\nUse second parameter to narrow down the search.\n\n```js\nI.seeElement('~edit'); // located by accessibility id\nI.seeElement('~edit', '#menu'); // element inside #menu\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** element to locate\n-   `context` **(CodeceptJS.LocatorOrString | null)** context element (optional, default `null`)\n\n#### checkIfElementExists\n\nChecks if an element exists.\n\n```js\nI.checkIfElementExists('~edit'); // located by accessibility id\nI.checkIfElementExists('~edit', '#menu'); // element inside #menu\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** element to locate\n-   `context` **(CodeceptJS.LocatorOrString | null)** context element (optional, default `null`)\n\n#### dontSeeElement\n\nChecks that element is not visible.\nUse second parameter to narrow down the search.\n\n```js\nI.dontSeeElement('~edit'); // located by accessibility id\nI.dontSeeElement('~edit', '#menu'); // element inside #menu\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** element to locate\n-   `context` **(CodeceptJS.LocatorOrString | null)** context element (optional, default `null`)\n\n#### seeElementExists\n\nChecks for existence of an element. An element can be visible or not.\nUse second parameter to narrow down the search.\n\n```js\nI.seeElementExists('~edit'); // located by accessibility id\nI.seeElementExists('~edit', '#menu'); // element inside #menu\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** element to locate\n-   `context` **CodeceptJS.LocatorOrString** context element (optional, default `null`)\n\n#### dontSeeElementExists\n\nChecks that element not exists.\nUse second parameter to narrow down the search.\n\n```js\nI.dontSeeElementExist('~edit'); // located by accessibility id\nI.dontSeeElementExist('~edit', '#menu'); // element inside #menu\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** element to locate\n-   `context` **CodeceptJS.LocatorOrString** context element (optional, default `null`)\n\n#### fillField\n\nFills in text field in an app.\nA field can be located by text, accessibility id, id.\n\n```js\nI.fillField('Username', 'davert');\nI.fillField('~name', 'davert');\nI.fillField({ android: 'NAME', ios: 'name' }, 'davert');\n```\n\n##### Parameters\n\n-   `field` **CodeceptJS.LocatorOrString** an input element to fill in\n-   `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** value to fill\n\n#### tapReturnKey\n\nTaps return key.\nA field can be located by text, accessibility id, id.\n\n```js\nI.tapReturnKey('Username');\nI.tapReturnKey('~name');\nI.tapReturnKey({ android: 'NAME', ios: 'name' });\n```\n\n##### Parameters\n\n-   `field` **CodeceptJS.LocatorOrString** an input element to fill in\n\n#### clearField\n\nClears a text field.\nA field can be located by text, accessibility id, id.\n\n```js\nI.clearField('~name');\n```\n\n##### Parameters\n\n-   `field` **CodeceptJS.LocatorOrString** an input element to clear\n\n#### appendField\n\nAppends text into the field.\nA field can be located by text, accessibility id, id.\n\n```js\nI.appendField('name', 'davert');\n```\n\n##### Parameters\n\n-   `field` **CodeceptJS.LocatorOrString** \n-   `value` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** \n\n#### scrollUp\n\nScrolls to the top of an element.\n\n```js\nI.scrollUp('#container');\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** \n\n#### scrollDown\n\nScrolls to the bottom of an element.\n\n```js\nI.scrollDown('#container');\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** \n\n#### scrollLeft\n\nScrolls to the left of an element.\n\n```js\nI.scrollLeft('#container');\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** \n\n#### scrollRight\n\nScrolls to the right of an element.\n\n```js\nI.scrollRight('#container');\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** \n\n#### swipeUp\n\nPerforms a swipe up inside an element.\nCan be `slow` or `fast` swipe.\n\n```js\nI.swipeUp('#container');\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** an element on which to perform swipe\n-   `speed` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a speed to perform: `slow` or `fast`. (optional, default `'slow'`)\n\n#### swipeDown\n\nPerforms a swipe up inside an element.\nCan be `slow` or `fast` swipe.\n\n```js\nI.swipeUp('#container');\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** an element on which to perform swipe\n-   `speed` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a speed to perform: `slow` or `fast`. (optional, default `'slow'`)\n\n#### swipeLeft\n\nPerforms a swipe up inside an element.\nCan be `slow` or `fast` swipe.\n\n```js\nI.swipeUp('#container');\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** an element on which to perform swipe\n-   `speed` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a speed to perform: `slow` or `fast`. (optional, default `'slow'`)\n\n#### swipeRight\n\nPerforms a swipe up inside an element.\nCan be `slow` or `fast` swipe.\n\n```js\nI.swipeUp('#container');\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** an element on which to perform swipe\n-   `speed` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** a speed to perform: `slow` or `fast`. (optional, default `'slow'`)\n\n#### wait\n\nWaits for number of seconds\n\n```js\nI.wait(2); // waits for 2 seconds\n```\n\n##### Parameters\n\n-   `sec` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** number of seconds to wait\n\n#### waitForElement\n\nWaits for an element to exist on page.\n\n```js\nI.waitForElement('#message', 1); // wait for 1 second\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** an element to wait for\n-   `sec` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** number of seconds to wait, 5 by default (optional, default `5`)\n\n#### waitForElementVisible\n\nWaits for an element to be visible on page.\n\n```js\nI.waitForElementVisible('#message', 1); // wait for 1 second\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** an element to wait for\n-   `sec` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** number of seconds to wait (optional, default `5`)\n\n#### waitToHide\n\nWaits an elmenet to become not visible.\n\n```js\nI.waitToHide('#message', 2); // wait for 2 seconds\n```\n\n##### Parameters\n\n-   `locator` **CodeceptJS.LocatorOrString** an element to wait for\n-   `sec` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** number of seconds to wait (optional, default `5`)\n\n#### scrollToElement\n\nScrolls within a scrollable container to an element.\n\n##### Parameters\n\n-   `targetLocator` **CodeceptJS.LocatorOrString** Locator of the element to scroll to\n-   `containerLocator` **CodeceptJS.LocatorOrString** Locator of the scrollable container\n-   `direction` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 'up' or 'down' (optional, default `'down'`)\n-   `offset` **[number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Offset for scroll, can be adjusted based on need (optional, default `100`)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeceptjs%2Fdetox-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeceptjs%2Fdetox-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeceptjs%2Fdetox-helper/lists"}