51Testing软件测试论坛

标题: 如何用selenium判断当前焦点是不是在某个元素上呢? [打印本页]

作者: 老土茗客    时间: 2012-2-17 10:50
标题: 如何用selenium判断当前焦点是不是在某个元素上呢?
新人一枚,求助!

请勿拍砖~

请多多关照了!!
作者: zhangting85    时间: 2012-2-21 15:25
WebDriver driver = ... // initialize the driver
WebElement currentElement = driver.switchTo().activeElement();
作者: dian106106    时间: 2012-4-13 08:16
selenium.focus(locator);




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2