MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / setScrollBehavior

Method setScrollBehavior

javascript/selenium-webdriver/ie.js:369–376  ·  view source on GitHub ↗

* Sets how elements should be scrolled into view for interaction. * @param {number} behavior The desired scroll behavior: either 0 to align with * the top of the viewport or 1 to align with the bottom. * @return {!Options} A self reference.

(behavior)

Source from the content-addressed store, hash-verified

367 * @return {!Options} A self reference.
368 */
369 setScrollBehavior(behavior) {
370 if (behavior && behavior !== SCROLL_BEHAVIOUR.TOP && behavior !== SCROLL_BEHAVIOUR.BOTTOM) {
371 throw new error.InvalidArgumentError(`Element Scroll Behavior out of range.
372 It should be either ${SCROLL_BEHAVIOUR.TOP} or ${SCROLL_BEHAVIOUR.BOTTOM}`)
373 }
374 this.options_[Key.ELEMENT_SCROLL_BEHAVIOR] = behavior
375 return this
376 }
377}
378
379function createServiceFromCapabilities(capabilities) {

Callers 1

options_test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected