I have a newbie question.
For some reason my code can't access the value stored in the keyword: this.Selector (last line of code). I think it must have something to do that it's a callback function but I don't what and how to change it.
class Test {
constructor(url, range, Selector){
this.url = url;
this.range = range;
this.Selector = Selector
}
async puppi(){
const browser = await puppeteer.launch({headless: true});
const page = await browser.newPage();
await page.goto(this.url);
const Voucher = await page.evaluate(()=>{
let GrapCoupons = document.querySelectorAll(this.Selector);
If you know why, then it would mean a lot to me since I am totally stucked.
Thanks in advance!!