Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jun 19 2020 17:20
    paps commented #73
  • Jun 19 2020 17:07

    paps on master

    0.3.8 (compare)

  • Jun 19 2020 15:21
    paps commented #80
  • Jun 19 2020 14:52
    msaus opened #80
  • Jun 19 2020 14:30
    dependabot[bot] labeled #79
  • Jun 19 2020 14:30
    dependabot[bot] opened #79
  • Jun 19 2020 14:30
    dependabot[bot] labeled #78
  • Jun 19 2020 14:30

    dependabot[bot] on npm_and_yarn

    Bump extend from 3.0.1 to 3.0.2… (compare)

  • Jun 19 2020 14:30
    dependabot[bot] opened #78
  • Jun 19 2020 14:30

    dependabot[bot] on npm_and_yarn

    Bump stringstream from 0.0.5 to… (compare)

  • Jun 19 2020 14:30

    paps on master

    Add deprecation notice in README fix puppeteer link fix deprecation notice in README and 2 more (compare)

  • Jun 19 2020 14:30
    paps closed #77
  • Jun 17 2020 12:13
    stressGC review_requested #77
  • Jun 17 2020 12:13
    stressGC assigned #77
  • Jun 17 2020 12:13
    stressGC opened #77
  • Jun 17 2020 12:09

    stressGC on deprecation

    remove doc broken link (compare)

  • Jun 17 2020 12:06

    stressGC on deprecation

    fix deprecation notice in README (compare)

  • Jun 17 2020 07:51

    stressGC on deprecation

    fix puppeteer link (compare)

  • Jun 17 2020 07:50

    stressGC on deprecation

    Add deprecation notice in README (compare)

  • Apr 03 2020 13:56
    spearmootz opened #76
Martin Barreau
@Payflic_Support_twitter you can try an evaluate to find the iframe document . You just need to call querySelector(__iframes_selector__).contentDocument to have the iframe dociment & use querySelector calls from the contentDocument to set values in the iframe form
Payflic Support
Thanks @TASnomad i actually figured this out. For anyone else who is struggling this with this and doesn't want to spend hours digging through google results here's a solution example:
const completeIFrameForm = (arg, cb) => {

    var iframe = document.querySelector("#Iframe_selector").contentWindow

    const nameInput = iframe.document.querySelector("#name").value = arg.name //Selector from within the iFrame

    cb(null, true)


const completeForm = await tab.evaluate(completeIFrameForm, {name})
Shripad Deshmukh
And can I use this library in php
Avi Aialon

Hi, im struggling to open a URL with POST. Im using the chrome driver with Google Chrome 62.0.3202.75, in the doc, it seems the options argument allows request method POST and data. for example:

var options = {
                method: 'post',
                data: {
                    test: 1
await tab.open(..., options)

But the requests are not coming in as POST (and the data isnt sent as well)

Martin Barreau
Hello @aviaialon, according to the open method documentation (you can find it here: https://hub.phantombuster.com/reference#nick-open) options argument is ignored when by chrome driver except the CasperJS one. Were you using the CasperJS driver?
Avi Aialon
@TASnomad I was using the Chrome driver. So theres no way to open a URL with POST when using the Chrome driver?
Martin Barreau
Yes, it’s not possible with the Chrome driver to open an URL with a POST
công ngô chí
Hello, when i run nickjs i see error: could not start chrome: Error: spawn google-chrome-beta ENOENT
how to fix it
Martin Barreau
Hello @leehanse_twitter, you can run this shell command export CHROME_PATH=/path/to/chrome/executable before launching your nickjs script. This shell line will tell to nickjs where is your chrome executable.
Hello guys
do you have any example of code with a POST request?
when I test mine I receive this error:
Something went wrong: TypeError: tab.driver.client.Network.setRequestInterception is not a function
bonjour Martin
Hello. is it possible to run the lib nick asynchronously? to work in several newTab at the same time?
Martin Barreau

Hello @AbdesJS
setRequestInterception is marked as experimental (and deprecated) on the Chrome DevTools Protocol, it recommended to use Fetch.enable instead (https://chromedevtools.github.io/devtools-protocol/tot/Fetch#method-enable)

You can try to use the following example as a NickJS evaluate to send a POST request:

const sendXHR = (arg, cb) => {
    const doXHR = ({ method, url, headers, data }) => {
        return new Promise((resolve, reject) => {
            let xhr = new XMLHttpRequest()

            xhr.addEventListener("readystatechange", function() {
                if (this.readyState === this.DONE) {

            xhr.onerror = function() {
                reject({ status: this.status, statusText: xhr.statusText })

            xhr.open(method, url)
            if (headers) {
                Object.keys(headers).forEach(el => xhr.setRequestHeader(el, headers[el]))
    cb(null, doXHR(arg))
thanks @TASnomad
Hi, got a really frustrating one here. Im trying to automate a product page and i need to be able to select the size option which is contained in a dropdown list. Any idea how to navigate drop down lists with NICKJS?
<select aria-label="size-dropdown" class="size-dropdown" name="size-dropdown">

<option value="0">Select Size</option>

<option value="3924119">XS</option>

<option value="3924120">S</option>

<option value="3924121">M</option>

<option value="3924122">L</option>

<option value="3924123">XL</option>

<option value="3924124" selected="selected">XXL</option>

<option value="3924125">XXXL</option></select>
Martin Barreau

Hello @PayFlic_ltd_twitter, you can use the following NickJS evaluate snippet to select a specific option by it’s value:

const selectOptionByContent = (arg, cb) => {
    const optionValue = "XS"
    let options = […document.querySelectorAll("select[name=\"size-dropdown\"] option")]
    options = options.filter(el => el.textContent).filter(el => el.textContent.trim().toLowerCase() === optionValue.toLowerCase())
    if (options.length < 1) {
        return cb(`option ${optionValue} not found`)
    const target = options[0]
    target.selected = true
    return cb(null, true)

If you already know the option value tag to target you can simply use in a NickJS evaluate: document.querySelector("select[name=\"size-dropdown\"] option=\"3924119\"").selected = true

@TASnomad brilliant thanks
Vi Nguyen

hello all, I'm trying to run chrome without headless mode for debug on my MacOS, but i can not run it, the code return this error

CHROME STDERR: [1129/143352.575017:ERROR:chrome_main_delegate.cc(617)] Web security may only be disabled if '--user-data-dir' is also specified.
CHROME STDOUT: Opening in existing browser session.

Fatal: Chrome subprocess exited with code 0

and this is my config:

const nick = new Nick({
  timeout: 60000,
  headless: false,
  debug: true,

can someone help me solve this issues?

Martin Barreau
Hi @ngtrieuvi92, which NickJS version triggers this fatal error?
Why it so hard to find starting point tutorial for novice when they say is so simple to use?
Can anyone share me some proper tutorial just like scrapy?
I use less than one day to deal with scrapy but the simple NickJS T-T
masao soseki
@sumate-sdk I guess you did not set up properly. Tutorial is easy enough for everyone.
Hello. Is there any option to select without headless mode? Sometime I need without headless mode. I can just comment out the source code. But, I feel like this is not good when nickjs is updated.

Hi Guys!

Jsut start playing with nickjs - looks clean.

Trying to understand - what's the major difference from puppeteer? When to use nickjs rather that puppeteer?

Ricardo Spear
is nickjs dead?
Martin Tapia
NickJS has not received a serious commit for more than a year now. We've marked it as 'deprecated' and archived the repo
NickJS was made before Puppeteer existed and it was very useful at that time. Now we recommend you switch to Puppeteer or Playwright :)