diff --git a/Userland/Services/WebDriver/Session.cpp b/Userland/Services/WebDriver/Session.cpp index 7a643cfe74..64dca937b2 100644 --- a/Userland/Services/WebDriver/Session.cpp +++ b/Userland/Services/WebDriver/Session.cpp @@ -465,7 +465,7 @@ static ErrorOr get_known_connected_element(StringView eleme } // https://w3c.github.io/webdriver/#dfn-find -ErrorOr Session::find(Session::LocalElement const& start_node, StringView const& using_, StringView const& value) +ErrorOr Session::find(Session::LocalElement const& start_node, StringView using_, StringView value) { // 1. Let end time be the current time plus the session implicit wait timeout. auto end_time = Time::now_monotonic() + Time::from_milliseconds(static_cast(m_timeouts_configuration.implicit_wait_timeout)); @@ -514,7 +514,7 @@ Vector Session::s_locator_strategies = { }; // https://w3c.github.io/webdriver/#css-selectors -ErrorOr, WebDriverError> Session::locator_strategy_css_selectors(Session::LocalElement const& start_node, StringView const& selector) +ErrorOr, WebDriverError> Session::locator_strategy_css_selectors(Session::LocalElement const& start_node, StringView selector) { // 1. Let elements be the result of calling querySelectorAll() with start node as this and selector as the argument. // If this causes an exception to be thrown, return error with error code invalid selector. @@ -533,28 +533,28 @@ ErrorOr, WebDriverError> Session::locator_strategy } // https://w3c.github.io/webdriver/#link-text -ErrorOr, WebDriverError> Session::locator_strategy_link_text(Session::LocalElement const&, StringView const&) +ErrorOr, WebDriverError> Session::locator_strategy_link_text(Session::LocalElement const&, StringView) { // FIXME: Implement return WebDriverError::from_code(ErrorCode::UnsupportedOperation, "Not implemented: locator strategy link text"); } // https://w3c.github.io/webdriver/#partial-link-text -ErrorOr, WebDriverError> Session::locator_strategy_partial_link_text(Session::LocalElement const&, StringView const&) +ErrorOr, WebDriverError> Session::locator_strategy_partial_link_text(Session::LocalElement const&, StringView) { // FIXME: Implement return WebDriverError::from_code(ErrorCode::UnsupportedOperation, "Not implemented: locator strategy partial link text"); } // https://w3c.github.io/webdriver/#tag-name -ErrorOr, WebDriverError> Session::locator_strategy_tag_name(Session::LocalElement const&, StringView const&) +ErrorOr, WebDriverError> Session::locator_strategy_tag_name(Session::LocalElement const&, StringView) { // FIXME: Implement return WebDriverError::from_code(ErrorCode::UnsupportedOperation, "Not implemented: locator strategy tag name"); } // https://w3c.github.io/webdriver/#xpath -ErrorOr, WebDriverError> Session::locator_strategy_x_path(Session::LocalElement const&, StringView const&) +ErrorOr, WebDriverError> Session::locator_strategy_x_path(Session::LocalElement const&, StringView) { // FIXME: Implement return WebDriverError::from_code(ErrorCode::UnsupportedOperation, "Not implemented: locator strategy XPath"); @@ -1253,7 +1253,7 @@ void Session::delete_cookies(Optional const& name) } // 14.4 Delete Cookie, https://w3c.github.io/webdriver/#dfn-delete-cookie -ErrorOr Session::delete_cookie(StringView const& name) +ErrorOr Session::delete_cookie(StringView name) { // 1. If the current browsing context is no longer open, return error with error code no such window. TRY(check_for_open_top_level_browsing_context_or_return_error()); diff --git a/Userland/Services/WebDriver/Session.h b/Userland/Services/WebDriver/Session.h index 4ce2824ba0..e51952ab0d 100644 --- a/Userland/Services/WebDriver/Session.h +++ b/Userland/Services/WebDriver/Session.h @@ -72,15 +72,15 @@ public: ErrorOr get_all_cookies(); ErrorOr get_named_cookie(String const& name); ErrorOr add_cookie(JsonValue const& payload); - ErrorOr delete_cookie(StringView const& name); + ErrorOr delete_cookie(StringView name); ErrorOr delete_all_cookies(); ErrorOr take_screenshot(); private: void delete_cookies(Optional const& name = {}); - ErrorOr find(LocalElement const& start_node, StringView const& location_strategy, StringView const& selector); + ErrorOr find(LocalElement const& start_node, StringView location_strategy, StringView selector); - using ElementLocationStrategyHandler = ErrorOr, WebDriverError> (Session::*)(LocalElement const&, StringView const&); + using ElementLocationStrategyHandler = ErrorOr, WebDriverError> (Session::*)(LocalElement const&, StringView); struct LocatorStrategy { String name; ElementLocationStrategyHandler handler; @@ -88,11 +88,11 @@ private: static Vector s_locator_strategies; - ErrorOr, WebDriverError> locator_strategy_css_selectors(LocalElement const&, StringView const&); - ErrorOr, WebDriverError> locator_strategy_link_text(LocalElement const&, StringView const&); - ErrorOr, WebDriverError> locator_strategy_partial_link_text(LocalElement const&, StringView const&); - ErrorOr, WebDriverError> locator_strategy_tag_name(LocalElement const&, StringView const&); - ErrorOr, WebDriverError> locator_strategy_x_path(LocalElement const&, StringView const&); + ErrorOr, WebDriverError> locator_strategy_css_selectors(LocalElement const&, StringView); + ErrorOr, WebDriverError> locator_strategy_link_text(LocalElement const&, StringView); + ErrorOr, WebDriverError> locator_strategy_partial_link_text(LocalElement const&, StringView); + ErrorOr, WebDriverError> locator_strategy_tag_name(LocalElement const&, StringView); + ErrorOr, WebDriverError> locator_strategy_x_path(LocalElement const&, StringView); NonnullRefPtr m_client; bool m_started { false };