Skip to content

Automate browser based workflows with AI

fix TOTP input issue (#1462)

LawyZheng113c91b108bc
diff --git a/skyvern/webeye/actions/handler.py b/skyvern/webeye/actions/handler.py
index 834b741ed..e516c7be3 100644
--- a/skyvern/webeye/actions/handler.py
+++ b/skyvern/webeye/actions/handler.py
@@ -664,7 +664,13 @@ async def handle_input_text_action(
return [ActionFailure(InvalidElementForTextInput(element_id=action.element_id, tag_name=tag_name))]
except Exception:
LOG.warning("Failed to clear the input field", action=action, exc_info=True)
- return [ActionFailure(InvalidElementForTextInput(element_id=action.element_id, tag_name=tag_name))]
+
+ # some <span> is supported to use `locator.press_sequentially()` to fill in the data
+ if skyvern_element.get_tag_name() != "span":
+ return [ActionFailure(InvalidElementForTextInput(element_id=action.element_id, tag_name=tag_name))]
+
+ await skyvern_element.press_fill(text=text)
+ return [ActionSuccess()]
try:
# TODO: not sure if this case will trigger auto-completion
diff --git a/skyvern/webeye/scraper/domUtils.js b/skyvern/webeye/scraper/domUtils.js
index 408bd37ab..a0a321ca4 100644
--- a/skyvern/webeye/scraper/domUtils.js
+++ b/skyvern/webeye/scraper/domUtils.js
@@ -619,6 +619,9 @@ function isInteractable(element) {
if (hasAngularClickBinding(element)) {
return true;
}
+ if (element.className.toString().includes("blinking-cursor")) {
+ return true;
+ }
// https://www.oxygenxml.com/dita/1.3/specs/langRef/technicalContent/svg-container.html
// svg-container is usually used for clickable elements that wrap SVGs
if (element.className.toString().includes("svg-container")) {