this is a preview of a page object model that works independently of the browser driver.
page and component object define a hierarchy, and each of this objects expose a .s
property that has an absolute css selector to find the element (eg. using document.querySelector
),
the way that property is built is by space-concatenating the css selectors of it's ancestors.
var page = this.page('checkout');
// page.orderConfirmation.purchase.s === ['#main .order-confirmation', 'button.purchase-btn'].join(' ')
browserDriver.click(page.orderReview.purchase.s);