Suppose I’ve developed an application with three main pages: loginPage
, productsPage
, and productDetailPage
. For each page, I’ve created a dedicated class. Additionally, I have separate test classes corresponding to each page.
In my test structure, the driver is managed in the base test class, and I’ve inherited the loginPage
class from it, passing the driver from the base to the login page. After successful login, the driver is passed to the productsPage
.
Now, considering that the productsPage
already has the driver, how can I invoke the methods of the productsPage
from the productsTest
class?