XPath - Select first element after some other element

后端 未结 3 923
醉梦人生
醉梦人生 2020-12-08 00:06

I\'m fairly new to XPath, been fiddling around with it for a few hours now, so i\'m not entirely sure if you can even do something like the following with it.

3条回答
  •  遥遥无期
    2020-12-08 00:56

    Correct me if i'm wrong - you need select "second drop down menu" from example above, but text can be duplicated, so you need only second one. XPath:

    //a[text()='second drop down menu'][2]
    

提交回复
热议问题