3
from autopilot.testcase import AutopilotTestCase
4
from testtools.matchers import NotEquals
8
class PropertyMatchingTest(AutopilotTestCase):
11
super(PropertyMatchingTest, self).setUp()
12
self.app = self.launch_test_application('gedit')
14
def test_integer_matches(self):
15
"""Test property matching for integers.
17
Find an opaque GtkWindow in Gedit.
20
opaque_window = self.app.select_many('GtkWindow', opacity=1)
21
self.assertThat(opaque_window, NotEquals(None))
24
def test_string_matches(self):
25
"""Match a string property.
27
Find an GtkImageMenuItem named 'BookmarkOpen' in Gedit.
30
bookmark_open_item = self.app.select_single('GtkImageMenuItem',
32
self.assertThat(bookmark_open_item, NotEquals(None))