• 请不要在回答技术问题时复制粘贴 AI 生成的内容
Uknowsec
V2EX  ›  程序员

PHP -webdriver-bindings findElementBy 定位问题,求解

  •  
  •   Uknowsec · Apr 7, 2018 · 1668 views
    This topic created in 2956 days ago, the information mentioned may be changed or developed.
    $element = $webdriver -> findElementBy(LocatorStrategy::xpath, '//*[@id="Table_01"]/tbody/tr[2]/td/table/tbody/tr/td[1]/table/tbody/tr[16]/td/table/tbody/tr/td/a/span/font') -> click();
    
    
    $element = $webdriver -> findElementBy(LocatorStrategy::xpath, '//*[@id="gridview"]/tbody/tr[2]/td[9]/a[1]') -> click();
    

    第一个可以运行 第二个不行,而且 xpath 路径也没有错。 很奇怪,求各位大佬帮助~~~

    报错信息:

    yogogo
        1
    yogogo  
       Apr 7, 2018 via iPhone
    看看那些报错的行写了什么?
    Uknowsec
        2
    Uknowsec  
    OP
       Apr 7, 2018
    @yogogo 182.254.133.173/index.html 这个是我要处理的 html
    我要定位到“管理日志” 但是不知道为什么就是定位不到
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5649 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 08:41 · PVG 16:41 · LAX 01:41 · JFK 04:41
    ♥ Do have faith in what you're doing.