I am using a Chrome extension to crawl data from one site. There is a 'load more' div on the site which loads the next 30 records on click. I use the code below to click and load the data:
Content.js
setTimeout(function(){
var activityTab = document.getElementsByClassName("loadMore")[0];
activityTab.click();
}, 5000);
It loads the next 30 records and generates a new 'load more' div, but I cannot click on this new dynamically loaded 'load more' div. How I can access dynamically generated HTML in the original site in JavaScript? I can only access data that is available in DOM of the original site on page load.