I am using a aspx page which is having a button.
I solved this question using this code:
document.all('Button1').click();