phantombuster / nickjs

Web scraping library made by the Phantombuster team. Modern, simple & works on all websites. (Deprecated)
https://nickjs.org
ISC License
500 stars 48 forks source link

Using jQuery instead of querySelector on Tab #65

Closed yazer79 closed 4 years ago

yazer79 commented 4 years ago

Hi! I am trying to use jQuery in the tab click instead of querySelector, is this possible? await tab.click($(div:contains('John')) I get $ is not defined jquery is injected before this click line and working well with the scrape after this

paps commented 4 years ago

That is because you're in the node context here. $ will only be available in an evaluate() call (because then the function is sent to chrome to be executed in the page, where $ was injected)