have misc card method clean up after itself

This commit is contained in:
Carl Furtado
2026-08-20 11:19:35 -04:00
parent af2eb68940
commit 3835fad251
2 changed files with 13 additions and 1 deletions
+5 -1
View File
@@ -41,9 +41,13 @@ document.dispatchEvent(new Event('visibilitychange'));
if handle not in exceptions and handle not in self.problematic_tabs:
self.driver.switch_to.window(handle)
if self.driver.current_url == GHOST_TAB_URL: continue
try: self.driver.close()
try:
self.driver.close()
print(f"[INFO] Closed tab with handle {handle} and URL {self.driver.current_url}.")
except WebDriverException:
print(f"[WARNING] Could not close tab with handle {handle}.")
self.problematic_tabs.add(handle)