~gerboland/unity/8-refactor-wm-and-test

« back to all changes in this revision

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

  • Committer: Michał Sawicz
  • Date: 2013-06-05 22:03:08 UTC
  • Revision ID: michal.sawicz@canonical.com-20130605220308-yny8fv3futtr04fg
Inital unity8 commit.

Previous history can be found at https://code.launchpad.net/~unity-team/unity/phablet

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
 
2
# Copyright 2013 Canonical
 
3
#
 
4
# This program is free software: you can redistribute it and/or modify it
 
5
# under the terms of the GNU General Public License version 3, as published
 
6
# by the Free Software Foundation.
 
7
 
 
8
class MainWindow(object):
 
9
    """An emulator class that makes it easy to interact with the shell"""
 
10
 
 
11
    def __init__(self, app):
 
12
        self.app = app
 
13
 
 
14
    def get_qml_view(self):
 
15
        """Get the main QML view"""
 
16
        return self.app.select_single("QQuickView")
 
17
 
 
18
    def get_greeter(self):
 
19
        return self.app.select_single("Greeter")
 
20
 
 
21
    def get_greeter_content_loader(self):
 
22
        return self.app.select_single("QQuickLoader", objectName="greeterContentLoader")
 
23
 
 
24
    def get_login_loader(self):
 
25
        return self.app.select_single("QQuickLoader", objectName="loginLoader")
 
26
 
 
27
    def get_login_list(self):
 
28
        return self.app.select_single("LoginList")
 
29
 
 
30
    def get_hud(self):
 
31
        return self.app.select_single("Hud")
 
32
 
 
33
    def get_hud_showable(self):
 
34
        return self.app.select_single("Showable", objectName="hudShowable")
 
35
 
 
36
    def get_hud_show_button(self):
 
37
        return self.app.select_single("HudButton")
 
38
 
 
39
    def get_dash(self):
 
40
        return self.app.select_single("Dash")
 
41
 
 
42
    def get_dash_home_applications_grid(self):
 
43
        return self.app.select_single("ApplicationsFilterGrid", objectName="dashHomeApplicationsGrid")
 
44
 
 
45
    def get_bottombar(self):
 
46
        return self.app.select_single("Bottombar")
 
47
 
 
48
    def get_launcher(self):
 
49
        return self.app.select_single("Launcher")