From 1251a6a201d655b165ea9e38a869413931764eb4 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Wed, 26 Aug 2026 14:45:15 +0100 Subject: [PATCH] Return the license key the wait found Closes #1499 Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01YJDy3qA1LyNTh11zS98ukM --- src/vws_web_tools/__init__.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/vws_web_tools/__init__.py b/src/vws_web_tools/__init__.py index 6c9e88c7..1ab102bd 100644 --- a/src/vws_web_tools/__init__.py +++ b/src/vws_web_tools/__init__.py @@ -969,18 +969,16 @@ def get_license_details( ), ) - long_wait.until( + # Use the value the wait returned rather than reading the element + # again: the wait only returns a non-empty key, but a second read + # can land after a re-render and see an empty box. + license_key = long_wait.until( method=lambda d: d.find_element( by=By.CLASS_NAME, value="license-key-box", ).text.strip(), ) - license_key = driver.find_element( - by=By.CLASS_NAME, - value="license-key-box", - ).text.strip() - return { "license_name": license_name, "license_key": license_key,