Giter Site home page Giter Site logo

Comments (4)

LucianoGanga avatar LucianoGanga commented on May 28, 2024 2

That's weird. I'm running all this in Node 7.10.0, and I don't have that problem.

Where are you calling that fn? It needs to be inside an async fn. Something like this (assuming you've already initialized the browser):

async function navigateGoogle () {
    await browser.goTo('www.google.com')
}

from simple-headless-chrome.

LucianoGanga avatar LucianoGanga commented on May 28, 2024

I can't test it on Windows, but for what I know so far, you're right. Just give it a try!

This module uses lighthouse's chromeLauncher, and it makes use of this file:

https://github.com/GoogleChrome/lighthouse/blob/v2.0.0/chrome-launcher/chrome-finder.ts

So, I think it should just work if your Chrome version is 59+

Please let me know if you could make it work, or if you need some help, so other people can benefit from your doubt :)

Cheers!
Luciano

from simple-headless-chrome.

Avaray avatar Avaray commented on May 28, 2024

Yes, You are right.

In Readme file you only mentioned about Mac and Linux.
So... Error that I got yesterday misleaded me to think there is no support for Windows.

Anyway - It's something with "await". I can't use await.
Example error:

await browser.goTo('https://github.com/')
^^^^^^^
SyntaxError: Unexpected identifier
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Function.Module.runMain (module.js:605:10)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3

I have this error in NodeJS 8.0.0 and 7.10.0 (I didn't test in older versions).

Actions without "await" works fine when I use them in Node console.

from simple-headless-chrome.

Avaray avatar Avaray commented on May 28, 2024

Ohhh...... this explains everything.
Sorry for your trouble.

from simple-headless-chrome.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.