I am currently developing a web scraping application for a website that utilizes tab headers to filter the contents of a table. In order to extract the data from the table, I need to first select a specific filter by clicking on a tab item. However, I'm encountering difficulties with clicking on the tab item, even though I can successfully click on a button using puppeteer and cheerio in my app.
While I have been able to navigate to the relevant page, interact with buttons, and extract data before, the tab header does not seem to respond in the same manner. It requires user interaction to select, yet my code is unable to replicate this action effectively.
Here is an excerpt of the code causing issues:
const page = await browser.newPage();
await page.goto('https://na.op.gg/summoner/champions/userName=' + 'TheJackal666');
const html = await page.content();
const $ = cheerio.load(html);
//The problematic line
await page.click('#SummonerLayoutContent > div.tabItem.Content.SummonerLayoutContent.summonerLayout-champions > div > div > div.Content.tabItems > div.tabItem.season-13 > div > div.stats-filter > div > div:nth-child(2)');
//Scraping function follows
Upon completing the rest of my scraping process, I expect to retrieve data specifically corresponding to the "Ranked Solo" tab header. However, despite attempting to activate that selector, the current code only scrapes information from the default "Total" tab header.
Any suggestions or guidance provided would be greatly appreciated! Thank you all for your help!