dump(); // Select all the windows with a title matching *code* $windows = $windows->visible()->find("*code*"); $windows->dump(); // Grab the first window $window = $windows->first(); $window->dump(); // Focus the window and simulate F1 being pressed $window->focus()->sendKeys("F1");