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

page.focus() #64

Closed
AshCoolman opened this issue Jan 18, 2018 · 3 comments
Closed

page.focus() #64

AshCoolman opened this issue Jan 18, 2018 · 3 comments
Assignees

Comments

@AshCoolman
Copy link

AshCoolman commented Jan 18, 2018

I'm having trouble getting puppetter to work - can anyone spot a problem with this test?

Thanks

import Differencify from '../index';

const differencify = new Differencify({ debug: true });

describe('Differencify', () => {
  beforeAll(async () => {
    await differencify.launchBrowser({ args: ['--no-sandbox', '--disable-setuid-sandbox'], headless: false });
  });
  afterAll(async () => {
    await differencify.cleanup();
  });
  it.only('simple', async () => {
    await differencify
      .init()
      .newPage()
      .setViewport({ width: 1024, height: 1024 })
      .goto('https://facebook.github.io/jest/docs/en/api.html')
      .page // tried without also
      .waitForSelector('footer')
      .focus('footer')
      .screenshot()
      .toMatchSnapshot()
      .close()
      .end();
  }, 20000);
@NimaSoroush
Copy link
Owner

Hi @AshCoolman :
Can you post the output of debug log here?
What is the actual error you are getting?

@AshCoolman
Copy link
Author

AshCoolman commented Jan 18, 2018

Apologies!

I simply misread the docs (I conflated page.hover() with page.focus())

@NimaSoroush
Copy link
Owner

@AshCoolman : No worries 😉

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

No branches or pull requests

2 participants