Code to click approve button in workflow actions through custom script

Hi All,

I created one script report for Doctype “Purchase Order”.There i added workflow action button.On click of “Approve” button in report, it should automatically click “Approve” button on particular selected “Purchase order” and status has to change automatically.

Please help me on this.

Thanks