51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 1110|回复: 4
打印 上一主题 下一主题

[求助] 使用SeleniumIDE能定位,到java中为什么定位不到

[复制链接]
  • TA的每日心情
    无聊
    2017-10-31 11:08
  • 签到天数: 7 天

    连续签到: 1 天

    [LV.3]测试连长

    跳转到指定楼层
    1#
    发表于 2017-7-29 18:19:06 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    这个是什么意思?????

    Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"id","selector":"J_Quick2Static"}
    Command duration or timeout: 35 milliseconds
    For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
    Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:03:00'
    System info: host: 'admin-PC', ip: '192.168.0.65', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_43'
    Session ID: d7af0da4-96e8-477f-b45c-a358afa75dc1
    Driver info: org.openqa.selenium.firefox.FirefoxDriver
    Capabilities [{platform=WINDOWS, acceptSslCerts=true, javascriptEnabled=true, browserName=firefox, rotatable=false, locationContextEnabled=true, version=33.1.1, cssSelectorsEnabled=true, databaseEnabled=true, handlesAlerts=true, nativeEvents=true, webStorageEnabled=true, applicationCacheEnabled=true, takesScreenshot=true}]
            at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
            at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
            at java.lang.reflect.Constructor.newInstance(Unknown Source)
            at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
            at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
            at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
            at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:352)
            at org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:393)
            at org.openqa.selenium.By$ById.findElement(By.java:214)
            at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:344)
            at day01.TestFirefox3.main(TestFirefox3.java:24)
    Caused by: org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"id","selector":"J_Quick2Static"}
    For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
    Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:03:00'
    System info: host: 'admin-PC', ip: '192.168.0.65', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.6.0_43'
    Driver info: driver.version: unknown
            at <anonymous class>.FirefoxDriver.prototype.findElementInternal_(file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous1510818938475279237webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:9641:26)
            at <anonymous class>.FirefoxDriver.prototype.findElement(file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous1510818938475279237webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js:9650:3)
            at <anonymous class>.DelayedCommand.prototype.executeInternal_/h(file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous1510818938475279237webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:11635:16)
            at <anonymous class>.DelayedCommand.prototype.executeInternal_(file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous1510818938475279237webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:11640:7)
            at <anonymous class>.DelayedCommand.prototype.execute/<(file:///C:/Users/ADMINI~1/AppData/Local/Temp/anonymous1510818938475279237webdriver-profile/extensions/fxdriver@googlecode.com/components/command-processor.js:11582:5)


    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
    收藏收藏
    回复

    使用道具 举报

  • TA的每日心情
    慵懒
    2021-12-24 13:41
  • 签到天数: 314 天

    连续签到: 1 天

    [LV.8]测试军长

    2#
    发表于 2017-7-30 09:48:30 | 只看该作者
    回放时找不到那个元素,加个等待时间试试或者看看你页面上有没有iframe

    评分

    参与人数 1测试积点 +10 收起 理由
    lsekfe + 10 积极回复获得测试积点10 赶快去商城换取奖.

    查看全部评分

    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-11-13 09:56 , Processed in 0.067604 second(s), 25 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表