Skip to content

Conversation

@JoelEinbinder
Copy link
Contributor

Adds a bunch more tests for Element.click, and throw new 'Node is not visible' error message.

test/test.js Outdated
expect(await page.evaluate(() => navigator.userAgent)).toContain('Safari');
}));
it('should support clicking', SX(async function() {
await page.goto(PREFIX + '/mobile.html');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this navigation needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not, mis-copy.


const quad = model.border;
if (!result)
throw new Error('Node is not visible');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd return null in this case and throw in the click itself.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@aslushnikov
Copy link
Contributor

Is this a fix to the #1294?

Copy link
Contributor

@aslushnikov aslushnikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great,thanks!

@aslushnikov aslushnikov merged commit b58d319 into puppeteer:master Nov 7, 2017
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

Successfully merging this pull request may close these issues.

2 participants