2016-07-21 102 views

回答

1

使用self

//*[contains(@id, "profile")]/div/div/div/div/*[self::a or self::h4]/a 

如果你想兩個.../div/a.../div/h4/a,利用工會的Xpath

//*[contains(@id, "profile")]/div/div/div/div/a | //*[contains(@id, "profile")]/div/div/div/div/a 
相關問題