There was an error while loading. Please reload this page.
We reccommend use to graph concept and direct mapping on DOM document
from pagium import Page, PageElement, WebElement, By, controls class MyPage(Page): __path__ = '/' class Header(WebElement): class AuthForm(WebElement): username = PageElement(controls.Input, by=By.NAME, value='username') password = PageElement(controls.Input, by=By.NAME, value='password') submit = PageElement(by=By.TAG_NAME, value='button') auth_form = PageElement(AuthForm, by=By.TAG_NAME, value='form') header = PageElement(Header, by=By.CSS_SELECTOR, value='[class*="header-wrapper"]') with MyPage(wd, 'http://project') as page: page.header.auth_form.username.fill('username') page.header.auth_form.password.fill('password') page.header.auth_form.submit.click()