Selenium to simulate click without loading link?

Viewed 36

I'm working on a project trying to autonomously monitor item prices on an Angular website.

Here's what a link to a particular item would look like:

https://www.<site-name>.com/categories/<sub-category>/products?prodNum=9999999

Using Selenium (in Python) on a page with product listings, I can get some useful information about the items, but what I really want is the prodNum parameter. The onClick attribute for the items = clickOnItem(item, $index). I do have some information for items including the presumable item and $index values which are visible within the html, but I'm doubtful there is a way of seeing what is actually happening in clickOnItem.

I've tried looking around using dev-tools to find where clickOnItem is defined, but I haven't been successful.

Considering that I don't see any way of getting prodNum without clicking, I'm wondering, is there's a way I could simulate a click to see where it would redirect to, but without actually loading the link- as this would take way too much time to do for each item?

Note: I want to get the specific prodNumber. I want to be able to hit the item page directly without first going though the main listing page.

0 Answers
Related