Skip to content

Commit

Permalink
Revert "WebDriver: Partial Implementation of Element Clear Endpoint"
Browse files Browse the repository at this point in the history
This reverts commit df2c6c9.
  • Loading branch information
hanpham32 committed Sep 10, 2024
1 parent 815e752 commit a89bd17
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions Userland/Services/WebContent/WebDriverConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <LibWeb/Platform/Timer.h>
#include <LibWeb/UIEvents/EventNames.h>
#include <LibWeb/UIEvents/MouseEvent.h>
#include <LibWeb/WebDriver/Error.h>
#include <LibWeb/WebDriver/ExecuteScript.h>
#include <LibWeb/WebDriver/Screenshot.h>
#include <WebContent/WebDriverConnection.h>
Expand Down Expand Up @@ -1515,21 +1514,15 @@ Messages::WebDriverClient::ElementClickResponse WebDriverConnection::element_cli
}

// 12.5.2 Element Clear, https://w3c.github.io/webdriver/#dfn-element-clear
Messages::WebDriverClient::ElementClearResponse WebDriverConnection::element_clear(String const& element_id)
Messages::WebDriverClient::ElementClearResponse WebDriverConnection::element_clear(String const&)
{
dbgln("FIXME: WebDriverConnection::element_clear()");

// 1. If element's innerHTML IDL attribute is an empty string do nothing and return.
auto* element = TRY(get_known_connected_element(element_id));
if (!element) {
return Web::WebDriver::Error::from_code(Web::WebDriver::ErrorCode::NoSuchElement, "Element not found");
}
// FIXME: 1. If element's innerHTML IDL attribute is an empty string do nothing and return.

// 2. Run the focusing steps for element.
Web::HTML::run_focusing_steps(element);
// FIXME: 2. Run the focusing steps for element.

// 3. Set element's innerHTML IDL attribute to an empty string.
TRY(element->set_inner_html(""sv));
// FIXME: 3. Set element's innerHTML IDL attribute to an empty string.

// FIXME: 4. Run the unfocusing steps for the element.

Expand Down

0 comments on commit a89bd17

Please sign in to comment.