So I end up using <https://github.com/GoogleChrome...
# announcements
n
So I end up using https://github.com/GoogleChrome/puppeteer a lot for browser automation, but it requires JS. Is there a Kotlin alternative? I’d rather avoid Selenium if I can. Are there any fancy modern libraries for browser automation in Kotlin?
j
You could create Kotlin
external
declarations for its API and then compile with Kotlin/JS
I have a Chrome extension written in 100% Kotlin by doing this for the Chrome platform APIs. I actually planned on doing it for puppeteer eventually as well so that I could test the extension integration.
n
Ooo do you have a link to said extension? Or a blog/tutorial on writing Kotlin wrappers for JS APIs?
Don't know of any resources, unfortunately. Been fakin' it until I made it. There's #javascript that's here to help though.
t
I’d rather avoid Selenium if I can
how come?
n
In my purely anecdotal experience Selenium is slow and janky. Its wait API is also a pain to use. By comparison Puppeteer is a joy to work with.