public void windowsKeyCtrlR(TestStep step) throws Exception { try { Robot robot = new Robot(); robot.keyPress(KeyEvent.VK_CONTROL); robot.keyPress(KeyEvent.VK_R); robot.keyRelease(KeyEvent.VK_CONTROL); robot.keyRelease(KeyEvent.VK_R); if (Constants.ISDEBUG) System.out.println("执行了ctrl+r"); } catch (Exception e) { e.printStackTrace(); if (Constants.ISDEBUG) System.err.println(Constants.LogCustom+"windowsKeyCtrlR"); } }
selenium 组合键操作
最新推荐文章于 2024-05-15 23:15:00 发布