How to automate article share and verifying that item shared successfully with facebook, twitter and google plus

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?

Sumit Kumar Sharma.

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.


Thanks for sharing such a good knowledge. Could you please explain how can we use these API? I never use API before.

It would be good if you provide some code in java to verify post using these API.

Thanks in advance!!

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):

Thanks a lot @wreed I will look into these documents…:slight_smile: