Skip to main content

Best practices

  • Use the Chrome DevTools by right-clicking on the webpage and selecting Inspect to access the Elements panel, where you can explore the HTML structure.

  • In the Elements panel, hover over the HTML elements to see the corresponding part of the webpage highlighted on the page, helping you identify the correct element more easily.

  • Right-click on the desired element in the Elements panel and select Copy > Copy selector to accurately capture the CSS selector for use in your code.

  • Press Ctrl+F (or Cmd+F on Mac) in the Elements panel to open the search box and test CSS selectors.

  • Alternatively, utilize the Console tab to manually test selectors by using document.querySelector("SELECTOR_HERE").

Scrollable code block. Use arrow keys to scroll.

Try Oyxlabs' Proxies & Scraper API

Residential Proxies

Self-Service

175M+ ethically sourced IPs built for the highest reliability.

From

8

Datacenter Proxies

Self-Service

High-speed, cost-effective proxies built for any scraping workload.

From

1.2

Web scraper API

Self-Service

All-in-one web data collection platform for every stage of web scraping.

From

49

Useful resources

Scraping Ecommerce Websites: How to Do It With Python
Maryia Stsiopkina avatar

Maryia Stsiopkina

2026-02-20

How to Find Elements With Selenium in Python
Enrika avatar

Enrika Pavlovskytė

2024-06-21

XPath vs CSS Selectors
Monika Maslauskaite avatar

Monika Maslauskaite

2021-07-13

Get the latest news from data gathering world