Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

1 like 0 dislike
356 views
by The go-to Tester (391 points)
retagged by
How may I implement Java interfaces with Selenium WebDriver Page Object pattern?
by The go-to Tester (181 points)
Can you give  me a scenario which I can take as a base to give you the explanation?
by The go-to Tester (391 points)
How may I implement an interface for a page object?

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)
Implementation of interface for PageObject does not make any sense to me. As PageObjects are collection of elements from the webpage. You can use abstract class to have common methods, like login, click, wait store in that class and extend that class with all your page objects.

You implement interface when you are writing your own framework, and you want user to write their own line of code and so you can utilize it further.

Hope that helps.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...