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 feature: keyboard with block #18

Merged
merged 1 commit into from
Aug 26, 2020
Merged

Conversation

YusukeIwaki
Copy link
Owner

REMARK: This feature is NOT originated from JS version of puppeteer. Available only in puppeteer-ruby.

It would be better if we can describe sequential operations with keyboard block like below:

      page.click('input')
      page.keyboard {
        type_text '123456789'
        down 'Shift'
        5.times { press 'ArrowLeft' }
        up 'Shift'
        send_character 'a'
      }

rather than

      page.click('input')
      page.keyboard.type_text '123456789'
      page.keyboard.down 'Shift'
      5.times { page.keyboard.press 'ArrowLeft' }
      page.keyboard.up 'Shift'
      page.keyboard.send_character 'a'

@YusukeIwaki YusukeIwaki merged commit 113cb93 into master Aug 26, 2020
@YusukeIwaki YusukeIwaki deleted the keyboard_with_block branch August 26, 2020 23:33
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.

1 participant