Javacsript + Android Webview: Click Button Programmatically
I am writing an Android App. The App opens a website in Webview. The website shows a rating bar, i.e. a rating bar that consists of 5 stars (i.e. buttons) to click on, but I want t
Solution 1:
You need an event listener on the clicks
let ratings = document.querySelectorAll(".rating");
forof(const rating of ratings){
rating.addEventListener('click',function(e){
//Whatever code you want to run
}
}
Post a Comment for "Javacsript + Android Webview: Click Button Programmatically"