XPath – Select first element after some other element
I had to read through your question a couple of times but I think I understand it. What you are interested in is predicates. Predicates allow you to pick nodes based on conditions. For example, you could do: //a[text()=’second dropdown menu’]/following::ul[1]/li/a[text()=’link i want to find’] this would select any anchor with certain text in, find … Read more