Follow

How can I implement dynamic page flow using page hierarchy design?

Consider the following case where page flow is configurable in AUT. 

  • According to flow suppose, one page flow is Review Page -> Passenger Page – > Payment Page
  • Another possible flow is Review Page -> Payment Page.

Blow sample shows you the implementation for such case.

public class ReviewFlightPage extends WebDriverBaseTestPage<ReviewPage>

implements PaymentLocators, PaymentsPageLauncher {

}

 
public class PassengerPage extendsWebDriverBaseTestPage<ReviewFlightPage>

 implementsPaymentLocators, PaymentsPageLauncher {

}

 

public class PaymentPage extendsWebDriverBaseTestPage<PaymentsPageLauncher>

 implementsPaymentLocators{

protecte void initParent() {

this.parent= (pageProps.getInt(“review.next.flow”) == 6)

? new ReviewFlightPage()

: new PassengerPage();

 }

}

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk