xpath - Is it possible to use Following and preceding in combination in Selenium? -
on page https://en.wikipedia.org/wiki/trinity_seven#episode_list have:
//*[text()='reception']//preceding::th[contains(@id, 'ep')]//following::i
but registers following.
the default firepath selector is: .//*[@id='mw-content-text']/div/table[5]/tbody/tr/td[1]/i
kind of selector known break quite frequently. wondering if there better way of doing , thought might way.
thanks! :) - can see it's getting stuff under table not want :s
try use below xpath
match required elements:
//th[contains(@id, 'ep')]/following::i[./following::*[text()='reception']]
Comments
Post a Comment