0

想要自动化:在 Mac 上的 fire fox/当前浏览器上进行标记。从 Java 应用程序使用。火狐 19 和 24

https://stackoverflow.com/a/9767643/1643558不工作

 someWebElement.sendKeys(Keys.TAB);

我现在拥有的:

private static java.awt.Robot robot;//in static block initialize this, at on time only one selenium is working so this is not multi threaded
 //inside function:
     try {
        robot.keyPress(KeyEvent.VK_TAB);

        int delay = 250;//some sleep between keys is a good idea        
        LangUtils.sleep(delay);
        robot.keyRelease(KeyEvent.VK_TAB);
        return true;
    } catch (Exception e) {
        logger.log(Level.ERROR, "Robot sendKeys :" + e, e);
        return false;
    }

你认为这会有所帮助吗:一个苹果脚本,它以浏览器名称/浏览器窗口标题作为参数并将该窗口带到前面,然后将选项卡事件发送到该窗口

还是有其他解决方案?

尝试过 selenium native - 不支持它也找到了这样说的线程。

4

0 回答 0