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

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

1 Answer

0 like 0 dislike
by The go-to Tester (160 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.
...