Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: seleniumOptions.callback is not a function #69

Open
pablohpsilva opened this issue Nov 29, 2020 · 1 comment
Open

TypeError: seleniumOptions.callback is not a function #69

pablohpsilva opened this issue Nov 29, 2020 · 1 comment

Comments

@pablohpsilva
Copy link

pablohpsilva commented Nov 29, 2020

I've installed the following dependencies:

{
  "dependencies": {
    "chromedriver": "^87.0.0",
    "selenium": "^2.20.0",
    "selenium-webdriver": "^4.0.0-alpha.7",
    "siphonjs": "^1.2.0"
  }
}

and I'm trying to run the following code:

require("chromedriver");
const siphon = require("siphonjs");

siphon()
  .get(
    "https://www.wunderground.com/cgi-bin/findweather/getForecast?query=90025"
  )
  .selenium("chrome", (driver) => {
    data = driver.findElement({ className: "class-name" }).getText();
    driver.quit();
    return data;
  })
  .run();

And I'm getting the following error:

Master cluster setting up 1 workers
/node_modules/siphonjs/lib/privateMethods/executeSelenium.js:14
    .callback(driver)
     ^

TypeError: seleniumOptions.callback is not a function
    at executeSelenium (/node_modules/siphonjs/lib/privateMethods/executeSelenium.js:14:6)
    at Object.execute (/node_modules/siphonjs/lib/privateMethods/execute.js:13:5)
    at process.on (/node_modules/siphonjs/lib/publicMethods/run.js:104:48)
    at process.emit (events.js:203:15)
    at emit (internal/child_process.js:832:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

What am I missing?

@willbach
Copy link
Contributor

willbach commented Dec 1, 2020

Hi! I haven't updated this library for a few years, so I'll have to check on what's going on. I should have time tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants