Hello, I am a Tester trying to learn Java to code my tests.
I was wondering if it is possible to have something like this (if it is how should it be declared??)

Page.pageElement.pageElementAction()

where Page - is a class representing a web page
pageElement - is a ui element found in a specific Page
(ideally pageElement should also be a class at least from my understanding)
pageElementAction() - is an action that can be performed on that specific pageElement
(this would be a method defined in the pageElement class)

ex.
LoginPage.Username.type("admin");
LoginPage.Password.type("password");
LoginPage.Login.click();

Thanks.

cags