summaryrefslogtreecommitdiff
path: root/test/test1.py
blob: 97db085ccf74c538d3b660866f46add56e9d509b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/python3

# This test opens the interface and just clicks around a bit.

import os
import dogtail.config
dogtail.config.config.logDebugToStdOut = True
dogtail.config.config.logDebugToFile = False

from dogtail.procedural import *

os.environ['LANG']='C'
run('atril')

# Test file->open
focus.application('atril')
click('File', roleName='menu')
click('Open…', roleName='menu item')
click('Cancel', roleName='push button')

# Toolbar editor
focus.application('atril')
click('Edit', roleName='menu')
click('Toolbar', roleName='menu item')
click('Close', roleName='push button')

# About dialog
focus.application('atril')
click('Help', roleName='menu')
click('About', roleName='menu item')
click('Credits', roleName='toggle button')
click('Credits', roleName='toggle button')
click('Close', roleName='push button')

# Close atril
focus.application('atril')
click.menu('File')
click('Close', roleName='menu item')