I have the below rule to match an image which works fine
//div[@class="wp-caption alignright" or @class="area"]//img
The problem is that the page is created dynamically and it now contains another image before the one I need to match, so I have a new xpath rule to accommodate for this
(//div[@class="body"]//img)[2]
Is there a way to combine these 2 rules into one as I actually need both?
Thanks
Just combine then with union operator:
You can test it here: http://www.xpathtester.com/obj/cf36d1bd-01c6-41ea-8e9b-2099cc75cf80