fix TOTP input issue (#1462)

This commit is contained in:
LawyZheng
2025-01-02 22:10:51 +08:00
committed by GitHub
parent 22f72c16ec
commit 113c91b108
2 changed files with 10 additions and 1 deletions

View File

@@ -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

View File

@@ -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")) {