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

solved -- Error: 'Emulation.resetViewport' wasn't found #26

Closed
garris opened this issue Jul 12, 2017 · 5 comments
Closed

solved -- Error: 'Emulation.resetViewport' wasn't found #26

garris opened this issue Jul 12, 2017 · 5 comments

Comments

@garris
Copy link
Contributor

garris commented Jul 12, 2017

looks like screenshotMultipleSelectors() may be broken?

$ node -v
v8.1.0

error:

~/Desktop/backstop test @gshipon-mn1(gshipon)
$ node chromyTest
error caught > Error: 'Emulation.resetViewport' wasn't found

script:

chromy
  .chain()
  .console(function (text, consoleObj) {
    if (console[consoleObj.level]) {
      console[consoleObj.level]((consoleObj.level).toUpperCase() + ' > ', text);
    }
  })
  .goto('examples/featureTests/index.html')
  .wait(1)
  .screenshotMultipleSelectors(
    ["body", "h1", "h2"],
    handlescreenshots,
    {useQuerySelectorAll: true}
  )
  .end()
  .then(_ => {
    chromy.close()
    console.log('success');
  })
  .catch(e => {
    chromy.close()
    console.log('error caught > ' + e);
  });


function handlescreenshots(error, png, index, selectors, sub){
  console.log('>>>',error, selectors[index], sub);
  fs.writeFileSync(`./screens/${selectors[index]}_${sub}.png`, png);
}

@garris
Copy link
Contributor Author

garris commented Jul 12, 2017

I have tried chromy 0.3.1, 0.3.2, 0.3.3 all return the same error. 😔

@garris garris changed the title Error: 'Emulation.resetViewport' wasn't found solved -- Error: 'Emulation.resetViewport' wasn't found Jul 12, 2017
@garris
Copy link
Contributor Author

garris commented Jul 12, 2017

@dotneet Found the issue! Chrome Canary was throwing the error. v61.0.3155.0
Don't know if that command was deprecated. Thought you'd want to know.

@garris garris closed this as completed Jul 12, 2017
@dotneet
Copy link
Contributor

dotneet commented Jul 12, 2017

Thanks. I confirmed that that command will be removed in future and discover alternative way.
I'll support both versions canary and stable.

@dotneet
Copy link
Contributor

dotneet commented Jul 16, 2017

@garris
I opened the issue that related to this problem at chromium 3 days ago.
https://bugs.chromium.org/p/chromium/issues/detail?id=741969

I've published new version of chromy that supports chrome61, but chrome's bug was fixed yesterday.
So maybe you need to update chrome canary.

@garris
Copy link
Contributor Author

garris commented Jul 16, 2017

will do. thanks!

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