[Webkit-unassigned] [Bug 230614] [WebDriver] Add support for shadow roots

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 4 06:26:09 PST 2022


https://bugs.webkit.org/show_bug.cgi?id=230614

Adrian Perez <aperez at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aperez at igalia.com
 Attachment #450514|review?                     |review+
              Flags|                            |

--- Comment #3 from Adrian Perez <aperez at igalia.com> ---
Comment on attachment 450514
  --> https://bugs.webkit.org/attachment.cgi?id=450514
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=450514&action=review

> Source/WebDriver/Session.cpp:1139
> +                if (isShadowRoot == ElementIsShadowRoot::Yes && result.errorString() == "stale element reference") {

Wouldn't it be more robust to compare the error code instead of comparing
strings? As in:

  result.errorCode == CommandResult::ErrorCode::StaleElementReference

> Source/WebDriver/WebDriverService.cpp:1461
>  }

These two functions are so similar... the only variation AFAICS is
using FindElementsMode::{Multiple,Single} in the last line; maybe most
of the function body could be factored out?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220204/06fda76c/attachment.htm>


More information about the webkit-unassigned mailing list