- pages
- drivers
- cases
- suites
class HomePage
def flightButton
return find_element_by_css('button[data-lob=flight]')
end
def flightPanel
return find_element_bs_css('#flight-panel')
end
def flyingFromField
return find_element_bs_css('input[data-lob')
end
end
class HomePageDriver
def initialize(page = HomePage)
@page = page
end
def clickFlightButton
page.flightButton.click()
waitFor(page.flightPanel).present()
end
def enterFlyingFrom(text)
page.flyingFromField.input(text)
end
end
class SearchForFlight
def initialize(driver = HomePageDriver)
@driver = driver
end
def execute
driver.clickFlightButton()
driver.enterFlyingFrom()
end
end