I Am Trying to Perform Particular Action In A Website Using Webview Javascript .
I Am Performing action using button in webviwer { Using ID }
I Am Using This : document.getElementById(“test_id”).click(); but in some case element ID is not there So Decided to Use Some Other Function Like document.getElementByClass Or document.querySelector But Both the function not working…
You asked for clicking on button, thats what this code is doing.
Manually clicking on that button (SD Button) is also not working in webviewer.
You can use other facebook video downloader like https://fdown.net/
Here are the blocks to use with the above website
After Javascript evaluation, the event block returns the currently executed js that why it returns thumbnail URL.
You can use the below code it will return sdlink, hdlink and thumbnail URL at once in json format
(function() {
var fbData = new Object();
fbData.sdlink = document.getElementById("sdlink").href;
fbData.hdlink = document.getElementById("hdlink").href;
fbData.image = document.getElementsByClassName("lib-img-show")[0].src;
return JSON.stringify(fbData);
})();