Selenium Webscraper to click() on carousel images without onClick?

Viewed 27

I am coding a webscraper in python using selenium and trying to fetch information from e-commerce platforms such as shopee.sg. The page I was attempting to web scrape is "https://shopee.sg/Casetify-Korean-Muzik-Tiger-Sticker-Silicone-TPU-Case-Cover-For-iPhone-7-8-Plus-X-XS-XR-11-12-13-Pro-Max-SE-2022-Casing-i.400808552.13985559875?sp_atk=0e2b4924-32ec-4e77-910f-20733030738b&xptdk=0e2b4924-32ec-4e77-910f-20733030738b"

I managed to successfully obtain the product name, variations and descriptions. However, the images they use is in a carousel image slider. One would need to click on the main image to expand and see all the other images the product listing has. For example below.

Before clicking on the image After clicking on the image

I attempted to use xpath to do a .click(). I soon realized they used divs and there is no onclick or click tags on it. I suspect they are using a script to handle onclick.

Questions: How do I go about this and click the tag to open up the carousel images?

0 Answers
Related