I am automating one application in which I have one scenario to share an article with facebook, Google plus, and twitter and verify that article shared successfully. I have written script for article sharing but how to verify that article has been shared. Can anybody suggest me how to automate this scenario?
All of the services that you need have public API’s that will give you this information programmatically. This would be the easiest way. Start reading here:
Alternatively you could try using Selenium and interacting with the web pages for these products, but if you just to verify a post then using the API is the way to do it.
Explaining how to use a Rest API is quite a large topic. You would be better served by reading a tutorial specifically on that. There are a ton of them just a google search away, but here is one that looks good and has examples in a bunch of different languages (including Java):