In this scenario, I want to navigate from the main page to the sub page and perform some actions. The url of the sub page is dynamically generated, but the page content is the same. This is what I have tried so far:
In the main class:
to MainPage
SubPageButton.click()
to SubPage
SelectAddressButton.click()
In the Page class:
public class SubPage extends Page {
static url = getCurrentUrl()
static content = {
SelectAddressButton { $("button", 0) }
}
}
I have alternatively tried (without any success)
- Defining the static content for the sub page ( SelectAddressButton ) in the Page object for the main page.
- Defining the sub page without the url
Thanks a lot in advance!