mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-11 17:56:15 +00:00
feat: Implement smart waiting utilities for improved page readiness and element detection
- Added `waitForPageReady` and `waitForElementSmart` functions to replace fixed timeouts with intelligent checks. - Updated various parts of the codebase to utilize the new smart wait functions, enhancing performance and reliability. - Improved logging for page readiness and element detection. - Refactored login and browser functions to reduce unnecessary waits and enhance user experience. - Fixed selector for MORE_ACTIVITIES to avoid strict mode violations. - Added unit tests for smart wait utilities to ensure functionality and performance.
This commit is contained in:
@@ -90,7 +90,9 @@ export const DELAYS = {
|
||||
} as const
|
||||
|
||||
export const SELECTORS = {
|
||||
MORE_ACTIVITIES: '#more-activities',
|
||||
// FIXED: Use more specific selector to avoid strict mode violation (2 elements with id='more-activities')
|
||||
// Target the mee-card-group element specifically, not the div wrapper
|
||||
MORE_ACTIVITIES: 'mee-card-group#more-activities[role="list"]',
|
||||
SUSPENDED_ACCOUNT: '#suspendedAccountHeader',
|
||||
QUIZ_COMPLETE: '#quizCompleteContainer',
|
||||
QUIZ_CREDITS: 'span.rqMCredits'
|
||||
|
||||
Reference in New Issue
Block a user