Beispiel #1
0
    def test_launch(self):
        """
        launch the browser
        """

        ff = Firefox()
        ff.launch()
Beispiel #2
0
    def test_get(self):
        """
        load a web page in the browser
        """

        ff = Firefox()
        ff.launch()

        ff.get('https://hubzero.org')
from hubcheck.browser import Firefox
from hubcheck.pageobjects.basepageobject import BasePageObject
from hubcheck.pageobjects.basepageelement import TextArea
from hubcheck.pageobjects.basepageelement import Text
from hubcheck.pageobjects.widgets.iframewrap import IframeWrap


installdir = os.path.dirname(os.path.realpath(__file__))

# setup logging
dc = hubcheck.utils.create_dictConfig('out.log','DEBUG')
logging.config.dictConfig(dc)
logger = logging.getLogger(__name__)

# open a web browser and load our example web page
browser = Firefox()
browser.get('file://'+ os.path.join(installdir,'iframe_example.html'))

# create a page object to hold the widgets
po = BasePageObject(browser,None)
po.locators = { 'frame1' : 'css=#frame1' ,
                'frame2' : 'css=#frame2' ,
                't0'     : 'css=#t0' ,
                't1'     : 'css=#t1' ,
                't2'     : 'css=#t2' , }


t0 = TextArea(po,{'base':'t0'})

# t1 is a widget that represents the text area
# element inside of the first iframe