How do I create a function that simulate the click on Update button for all posts?

How do I create a function that simulate the click on Update button for all posts?