anchor.diff:          machine.succeed(
               ru(
                   "${xdo "find-window" ''
  -                  search --sync --onlyvisible --name "sandbox status"
  +                  search --sync --onlyvisible --name "Sandbox Status"
                     windowfocus --sync
                   ''}"
               )
  
positive.code:   testScript = let
      xdo = name: text: let
        xdoScript = pkgs.writeText "${name}.xdo" text;
      in "${pkgs.xdotool}/bin/xdotool '${xdoScript}'";
    in ''
      import shlex
      from contextlib import contextmanager, _GeneratorContextManager
  
negative.code: 
  
      def create_new_win():
          """Creates a new Chromium window."""
          with machine.nested("Creating a new Chromium window"):
              machine.wait_until_succeeds(
                  ru(
                      "${xdo "create_new_win-select_main_window" ''
                        search --onlyvisible --name "startup done"
                        windowfocus --sync
                        windowactivate --sync
                      ''}"
                  )
              )
              machine.send_key("ctrl-n")
              # Wait until the new window appears:
              machine.wait_until_succeeds(
                  ru(
                      "${xdo "create_new_win-wait_for_window" ''
                        search --onlyvisible --name "New Tab"
                        windowfocus --sync
                        windowactivate --sync
                      ''}"
                  )
              )
  
  
      def close_new_tab_win():
          """Closes the Chromium window with the title "New Tab"."""
          machine.wait_until_succeeds(
              ru(
                  "${xdo "close_new_tab_win-select_main_window" ''
                    search --onlyvisible --name "New Tab"
                    windowfocus --sync
                    windowactivate --sync
                  ''}"
              )
          )
          machine.send_key("ctrl-w")
          # Wait until the closed window disappears:
          machine.wait_until_fails(
              ru(
                  "${xdo "close_new_tab_win-wait_for_close" ''
                    search --onlyvisible --name "New Tab"
                  ''}"
              )
          )
  
  
      @contextmanager
      def test_new_win(description):
          create_new_win()
          with machine.nested(description):
              yield
          # Close the newly created window:
          machine.send_key("ctrl-w")
  
  
      machine.wait_for_x()
  