Slide 15
Slide 15 text
async click(x, y) {
const point = await clickablePoint(x, y)
await scrollToPosition(x, y)
await Promise.all([
mouse.down(x, y),
mouse.up(x, y),
])
}
def click(x, y)
Concurrent::Promises.future do
point = clickable_point(x, y).value!
scroll_to_position(x, y).value!
Concurrent::Promises.zip(
mouse.down(x, y),
mouse.up(x, y),
).value!
end
end
concurrent-rubyを使ったasync/awaitっぽい実装
※ 擬似コードです