I use Node.js along with Zombie.js for scraping. On some pages, I need to click a Javascript link
Here is the example of the page
http://www.indotrading.com/company/berkat-jaya-electronics.aspx
And the part that I want to click is <a class="showme".. > </a>, which calls a javascript. How can I do it using Zombie.js? Or is there any alternative to Zombie.js that can handle javascript link?
You can use browser.clickLink to do this. The selector can be your class or the link text, whichever is specific enough for your situation:
browser.clickLink(".showme", function(err, browser, status) {
//link has been clicked and actions processed
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With