schickling/chromeless
在 GitHub 查看Performing copy/paste clipboard operations via chromeless
Open
#366 创建于 2017年12月21日
help wantedquestion
仓库指标
- Star
- (13,240 star)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
I was trying to test copy/paste in Chromeless but it’s not working.
I’m not sure if I’m missing something or it’s rather a common problem.
Is there any known approach for performing clipboard operation using Chromeless? I’ve tried performing CTRL+C and CTRL+V key strokes but it doesn’t seem to work:
const chromeless = new Chromeless({ remote: true })
const screenshot = await chromeless
.goto('https://vimeo.com/search')
.type('Lorem ipsum')
.press(65, 1, 17)
.press(88, 1, 17)
.focus('.js-topnav_menu_search_input')
.press(86, 1, 17)
.screenshot()
console.log(screenshot)
await chromeless.end()