diff --git a/Userland/Applications/Browser/Tab.cpp b/Userland/Applications/Browser/Tab.cpp index fb281995ec..e910a3621a 100644 --- a/Userland/Applications/Browser/Tab.cpp +++ b/Userland/Applications/Browser/Tab.cpp @@ -668,6 +668,8 @@ void Tab::hide_event(GUI::HideEvent&) void Tab::enable_webdriver_mode() { m_web_content_view->set_is_webdriver_active(true); + auto& webdriver_banner = *find_descendant_of_type_named("webdriver_banner"); + webdriver_banner.set_visible(true); } } diff --git a/Userland/Applications/Browser/Tab.gml b/Userland/Applications/Browser/Tab.gml index 8371af44df..8d09e39052 100644 --- a/Userland/Applications/Browser/Tab.gml +++ b/Userland/Applications/Browser/Tab.gml @@ -11,6 +11,26 @@ } } + @GUI::Frame { + name: "webdriver_banner" + shape: "Box" + shadow: "Sunken" + thickness: 1 + preferred_height: "shrink" + foreground_role: "TooltipText" + background_role: "Tooltip" + fill_with_background_color: true + visible: false + layout: @GUI::HorizontalBoxLayout { + margins: [0, 4] + } + + @GUI::Label { + text: "This Browser window is controlled by WebDriver." + text_alignment: "CenterLeft" + } + } + @GUI::Widget { name: "webview_container" layout: @GUI::VerticalBoxLayout {}