Created
July 24, 2023 16:55
-
-
Save danromero/91cf2aa3a4d4dd6fe4c6f8ecd0adc8d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
repeat 10 times | |
tell application "Google Chrome" to tell active tab of window 1 | |
-- Click the "More" button | |
execute javascript "document.querySelector('div[role=\"button\"][aria-label=\"More\"]').click();" | |
delay 0.1 | |
-- Click the "Delete conversation" button | |
execute javascript "Array.from(document.querySelectorAll('div[role=\"menuitem\"]')).find(el => el.innerText.includes('Delete conversation')).click();" | |
delay 0.1 -- You might need to adjust this delay based on the page's behavior | |
-- Click the "Leave" confirmation button | |
execute javascript "document.querySelector('div[data-testid=\"confirmationSheetConfirm\"]').click();" | |
delay 0.1 -- This delay ensures there's enough time for each action to complete | |
end tell | |
end repeat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment