Home » Java » How can I handle a common button across all pages in Page Object Model – Selenium?

How can I handle a common button across all pages in Page Object Model – Selenium?

Posted by: admin October 26, 2017 Leave a comment

Questions:

In a Page Object Model, how do you handle a common button which is there across multiple pages.

Ex: In a search results page, NEXT button.

Condition: I do not want to repeat the action of clicking the button on each page.I want to write the code just once and want to reuse it across pages.How do you do that?

Thanks,
Karunagara Pandi G

Answers: