It already exists for KDE: https://community.kde.org/Selenium