jubishop / smalldemocracy

Tools for a Small Democracy.
https://smalldemocracy.com
Other
2 stars 1 forks source link

Figure out how to fetch clipboard contents #258

Open jubishop opened 2 years ago

jubishop commented 2 years ago

for testing the API "copy to clipboard" button.

things I've tried:

    page.driver.browser.command(
        'Browser.setPermission',
        origin: page.server_url,
        permission: { name: 'clipboard-read' },
        setting: 'granted')
    page.driver.browser.command(
        'Browser.grantPermissions',
        permissions: ['clipboardReadWrite'])
    clip_text = page.evaluate_async_script('navigator.clipboard.readText().then(arguments[0])')
    puts clip_text