TA的每日心情 | 怒 2017-5-5 15:56 |
---|
签到天数: 17 天 连续签到: 1 天 [LV.4]测试营长
|
Caused by: org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may not be interacted with
Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50'
System info: host: 'USER-20160219JF', ip: '192.168.15.92', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_04'
Driver info: driver.version: unknown
at <anonymous class>.fxdriver.preconditions.visible(file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous6681953886405693411webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:9587)
at <anonymous class>.DelayedCommand.prototype.checkPreconditions_(file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous6681953886405693411webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12257)
at <anonymous class>.DelayedCommand.prototype.executeInternal_/h(file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous6681953886405693411webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12274)
at <anonymous class>.DelayedCommand.prototype.executeInternal_(file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous6681953886405693411webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12279)
at <anonymous class>.DelayedCommand.prototype.execute/<(file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous6681953886405693411webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:12221)
用的写法是
WebElement element = driver.findElement( By.xpath(".//select[@id='sel-car']"));
element.findElements(By.tagName("option")).get(1).click();
多谢了 |
|