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

Add informative documentation for alert/prompt/confirm/beforeunload #975

Merged
merged 2 commits into from
Dec 24, 2019

Conversation

zabil
Copy link
Member

@zabil zabil commented Dec 18, 2019

Make things clear with an example as a lot of questions about this keep coming up.

lib/taiko.js Outdated
* // Note: Taiko's `alert` listener has to be setup before the alert
* // displays on the page. For example, if clicking on a button
* // shows the alert, the Taiko script is
* await alert('Message on alert' => accept())
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be alert('Message on alert', async () => accept())

lib/taiko.js Outdated
* // Note: Taiko's `prompt` listener has to be setup before the prompt
* // displays on the page. For example, if clicking on a button
* // shows the prompt, the Taiko script is
* await prompt('Message on prompt' => accept('Something'))
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be prompt('Message on prompt', () => accept('Something'))

lib/taiko.js Outdated
* // Note: Taiko's `confirm` listener has to be setup before the confirm
* // popup displays on the page. For example, if clicking on a button
* // shows the confirm popup, the Taiko script is
* await confirm('Message on prompt' => accept())
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be confirm('Message on confirm', () => accept())

@negiDharmendra negiDharmendra merged commit d71b7ef into getgauge:master Dec 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants