~alanbell/webbrowser-app/interneticon-1505970

« back to all changes in this revision

Viewing changes to tests/autopilot/kalossi_browser/emulators/main_window.py

  • Committer: Michael Zanetti
  • Date: 2013-01-14 15:47:33 UTC
  • mto: This revision was merged to the branch mainline in revision 19.
  • Revision ID: michael_zanetti@gmx.net-20130114154733-99esebl4s4f242ym
Added initial autopilot tests and autopilot package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
class MainWindow(object):
 
2
    """An emulator class that makes it easy to interact with the camera-app."""
 
3
 
 
4
    def __init__(self, app):
 
5
        self.app = app
 
6
 
 
7
    def get_qml_view(self):
 
8
        """Get the main QML view"""
 
9
        return self.app.select_single("QQuickView")
 
10
 
 
11
    def get_address_bar(self):
 
12
        """Get the browsers address bar"""
 
13
        return self.app.select_single("TextField", objectName="addressBar")
 
14
 
 
15
    def get_address_bar_clear_button(self):
 
16
        return self.get_address_bar().get_children_by_type("AbstractButton")[0]
 
17
 
 
18
    def get_web_view(self):
 
19
        return self.app.select_single("QQuickWebView")