A Chrome browser extension that helps you find the XPath of any DOM element on a webpage. Perfect for web scraping, test automation, and web development.
- Right-click context menu integration
- One-click XPath generation
- Copy to clipboard functionality
- Toggle extension on/off
- Visual feedback with icon states
- Works on any webpage
- Minimal permissions required
- Open Chrome and navigate to
chrome://extensions/ - Enable "Developer mode" using the toggle in the top-right corner
- Click "Load unpacked extension"
- Browse to the project root folder and select it
- The XPath Seeker icon will appear in your browser toolbar
- Right-click on any element on a webpage
- Select "Get XPath" from the context menu
- The XPath will be displayed in a prompt window
- Use Ctrl/Cmd + C to copy the XPath
- Click the extension icon to toggle it on/off
XPath-Seeker/
├── _locales/
│ └── en/
│ └── messages.json # Localization strings
├── images/
│ ├── icon128.png # Extension icons
│ ├── icon48.png
│ ├── icon16.png
│ ├── icon48-grey.png # Disabled state icons
│ └── icon16-grey.png
├── src/
│ ├── background.js # Background script
│ └── contentScript.js # Content script for DOM interaction
└── manifest.json # Extension manifest
- Manages context menu integration
- Handles extension icon state
- Processes XPath requests
- Manages clipboard operations
- Tracks clicked elements
- Generates XPath expressions
- Communicates with background script
- DOM manipulation and monitoring
{
"name": "XPath Seeker",
"version": "1.0.0",
"manifest_version": 2,
"permissions": [
"contextMenus",
"notifications"
]
}The extension requires minimal permissions:
contextMenus: For the right-click menu integrationnotifications: For user feedback
No build process required - the extension runs directly from source.
- Make changes to the source files
- Reload the extension in Chrome
- Test functionality on various websites
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
- Chrome 6.0.0.0 or later
- Chromium-based browsers (Edge, Opera, etc.)
This project is licensed under the MIT License - see the LICENSE file for details.
CodingTumbleweed
- Chrome Extension API Documentation
- XPath specification
- Open-source community