Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Easily create page objects with a declarative syntax

Project description

Sunbro is a module aimed to ease the creation of Page Objects by allowing them to be written in a declarative way, similar to the way models and forms are written in the django web framework.

import sunbro from selenium import webdriver

class YapoAdInsertPage(sunbro.Page):

subject = sunbro.FindElement(‘name’, ‘subject’) body = sunbro.FindElement(‘name’, ‘body’) price = sunbro.FindElement(‘name’, ‘price’)

def go(self):
if __name__ == ‘__main__’:
driver = webdriver.Firefox() page = YapoAdInsertPage(driver) page.go() page.subject.send_keys(‘Praise the sun, bros!’) page.body.send_keys(‘…to summon one another as spirits, cross the gaps between the worlds, and engage in jolly co-operation!’) page.price.send_keys(‘1231’)

Why sunbro?

Project details

Release history Release notifications

This version
History Node


Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page