Clicking a button using javascript, but how to hide a button?

Due to one scenario I have to call script to click on a button. That button should be hidden. The issue is when I am setting Visibility to Never js script to click on button does not work. But I have to hide the button. Is there anyway to do it. There is a link in pega which talks about hidden button but how to hide the button? Any idea?

Reference link

In the above link the first point is

  1. Include a hidden button with open workitem in the section

But it has not been clarified that how we will create a hidden button

@AMITTUTUN

Can you try to hide the button using CSS - style="visibility: hidden; display: none; and check?

Refer - https://stackoverflow.com/questions/1091636/jquery-and-trigger-a-click-on-a-hidden-button/18604506

@TashikaS Thanks Tashika!! I created a css class openWorkHidden with "visibility: hidden; display: none and that solves the issue.