Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

selenium-pauser

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

selenium-pauser

When you are using the [Selenium Driver](http://seleniumhq.github.io/selenium/docs/api/javascript/), you may not want to quit the browser for debugging. It will be able to pause at the specified place by using the Selenium Pauser.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Selenium Pauser

When you are using the Selenium Driver, you may not want to quit the browser for debugging. It will be able to pause at the specified place by using the Selenium Pauser.

Usage

import pauser from 'selenium-pauser';

driver.findElements(By.css('.tlFrameView .tlLineView'))
  .then((elems) => {
    return driver.actions()
      .mouseMove(elems[lineIndex].findElement(By.css('.tlHourView._'+hour+' .tlMinView._15')), {x:1, y:1})
      .click()
      .perform();
  }).then(() => pauser.pause()).then(() => {
    return driver.wait(() => {
      dialogElem = driver.findElement(By.css('.event-dialog'));
      return dialogElem.isDisplayed();
    }, 4000)
  }).then(() => new FirstView(driver, dialogElem));

The return value of pauser.pause() is an instance of Promise. You just call the pauser.pause() at the place you want to stop in the then function.

If you want to pass an arguments to the next "Promise chain", please pass the first argument of "pauser.pause ()".

    page.load()
      .then(() => page.openDialog(1, 10)) //openDialog returns `firstView` instance to the next promise.
      .then((firstView) => pauser.pause(firstView))
      .then((firstView) => console.log(firstView))
      ;

This code is equivalent below:

    page.load()
      .then(() => page.openDialog(1, 10)) //openDialog returns `firstView` instance to the next promise.
      .then((firstView) => pauser.pause().then(() => firstView))
      .then((firstView) => console.log(firstView))
      ;

FAQs

Package last updated on 09 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc