=XPathOnUrl(“www.example.com”,"count(//h2)")
I’m using the above to give me the count of all the h2 tags on a page.
This is working OK.
I looking to take this a step further but I’ve reached the limit of my knowledge.
I want to get the match count of the h2 tags that contain a specific keyword and also the total number of h2 tags.
Let’s say the keyword is “banana”
So the output I’m looking for is:
Number of h2 tags = xxx
Number of h2 tags containing banana or Banana = xxx
Any help would be much appreciated