There was an error while loading. Please reload this page.
from pagium import Page page = Page(wd, 'http://project-host') page.open()
wd is web driver instance
wd
You can relate page class to URL path and use base project URL when instance to create. In example will be opened http://project-host/url/path/here
http://project-host/url/path/here
from pagium import Page class MyPage(Page): __path__ = '/url/path/here' page = MyPage(wd, 'http://project-host') page.open()
In example will be opened http://project-host/url/path/here
from pagium import Page class MyPage(Page): __path__ = '/url/{param1}/{param2}' page = MyPage(wd, 'http://project-host', path={'param1': 'path', 'param2': 'here'}) page.open()
In this case will be called open and close methods of page class
open
close
from pagium import Page with Page(wd, 'http://project-host') as page: pass