poe2-bot/src-old/trade/selectors.ts
2026-02-13 01:12:11 -05:00

30 lines
1.3 KiB
TypeScript

// CSS selectors for the POE2 trade website (pathofexile.com/trade2)
// These need to be verified against the live site and updated if the site changes.
export const SELECTORS = {
// Live search activation button
liveSearchButton: 'button.livesearch-btn, button:has-text("Activate Live Search")',
// Individual listing rows
listingRow: '.resultset .row, [class*="result"]',
// Listing by item ID
listingById: (id: string) => `[data-id="${id}"]`,
// "Travel to Hideout" / "Visit Hideout" button on a listing
travelToHideoutButton:
'button:has-text("Travel to Hideout"), button:has-text("Visit Hideout"), a:has-text("Travel to Hideout"), [class*="hideout"]',
// Whisper / copy button on a listing
whisperButton:
'.whisper-btn, button[class*="whisper"], [data-tooltip="Whisper"], button:has-text("Whisper")',
// "Are you sure?" confirmation dialog
confirmDialog: '[class*="modal"], [class*="dialog"], [class*="confirm"]',
confirmYesButton:
'button:has-text("Yes"), button:has-text("Confirm"), button:has-text("OK"), button:has-text("Accept")',
confirmNoButton: 'button:has-text("No"), button:has-text("Cancel"), button:has-text("Decline")',
// Search results container
resultsContainer: '.resultset, [class*="results"]',
} as const;