xpath - Is it possible to use Following and preceding in combination in Selenium? -


enter image description hereon 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

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -