V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
angel725
V2EX  ›  问与答

appium + Python 这个 id 为什么取不到呢

  •  
  •   angel725 · Feb 15, 2019 · 1853 views
    This topic created in 2632 days ago, the information mentioned may be changed or developed.
    DY 的视频下面,在歌名上都会有几句视频说明。

    我用 appium。取文字的时候,总是找不到,是为什么?
    find_element_by_id('com.ss.android.ugc.aweme:id/l7')

    错误
    selenium.common.exceptions.NoSuchElementException: Message: An element could not be located on the page using the given search parameters.

    试了好多次,查了几遍 id 没错。但就是不行。
    奇怪


    我试过在命令行 里 dump 出 xml,发现是有这个元素的。但是在代码里就不行了。


    后来在 python 代码里运行命令行 dump 出这个 xml.发现总是取不到。

    好奇怪。我不要视频,只是练习 取元素的内容。。。。

    是什么原因呢?请教请教
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2372 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 04:22 · PVG 12:22 · LAX 21:22 · JFK 00:22
    ♥ Do have faith in what you're doing.