MCPcopy Create free account
hub / github.com/ICBNetwork/web3-Wallet / scrollToElement

Method scrollToElement

e2e/utils/Gestures.js:176–189  ·  view source on GitHub ↗

* Dynamically Scrolls to an element identified by ID. * * @param {Promise } destinationElementID - ID of the element to scroll up to * @param {number} scrollIdentifier - The identifier (by.id) NOT elementID (element(by.id)). Keep this distinction in mind. If you

(
    destinationElementID,
    scrollIdentifier,
    direction = 'down',
    scrollAmount = 350,
  )

Source from the content-addressed store, hash-verified

174 * @param {Detox.Direction} direction - Direction of the scroll (up, down, left, right). The default is down.
175 * @param {number} [scrollAmount=350] - The amount to scroll (default is 350). Optional parameter. */
176 static async scrollToElement(
177 destinationElementID,
178 scrollIdentifier,
179 direction = 'down',
180 scrollAmount = 350,
181 ) {
182 const destinationElement = await destinationElementID;
183 const scrollableElement = await scrollIdentifier;
184
185 await waitFor(destinationElement)
186 .toBeVisible()
187 .whileElement(scrollableElement)
188 .scroll(scrollAmount, direction);
189 }
190}
191
192export default Gestures;

Calls

no outgoing calls

Tested by

no test coverage detected