0

I want to find the following element on a web site: //a[@class="a-link-normal"]/@href inside this element: //div[@class="s-result-list s-search-results sg-row"]. I tried this one: //*[contains(@class='s-result-list s-search-results sg-row') and contains(@class='a-link-normal')]")) but it doesn't work, xpath helper shows "invalid xpath expression". Probably the solution is quite simple, but i can't make it work.

Thanks in advance

1
  • Please provide a sample of code or url. It's a bit hard to work blindfolded. Commented May 1, 2020 at 15:31

1 Answer 1

1

So, Amazon. You're looking for this (you didn't use the correct div) :

//div[@class="s-main-slot s-result-list s-search-results sg-row"]//a[@class="a-link-normal"]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.