1 Var LANG=en-us
2
3 # This procedure
will open Firefox in the locale specified by argument.
4 # It will open the
browser menu, Preferences and Help windows and Search bar.
5 # Screenshots will
be taken at major points.
6 # Parameter: {1} -
desired browser locale, e.g. en-us, es-es, de-de
7 procedure
test_firefox {
8 # Close
all windows and open the Run Application window on Gnome
9 Press
Alt+F4 count=2 wait=1s
10 Press
Alt+F2 wait=4s
11
12 #
Start Firefox in desired language
13
Typeline "firefox -UILocale {1}"
14
15 # Wait
for major update of the remote screen
16
Waitfor update extent="50%" timeout="30s" ontimeout="Exit 1"
17
18 # Open
the Firefox menu - keys F10 and "arrow down"
19 Press
F10 wait=200
20 Press
Down wait=1s
21
Screenshot firefox-menu-{1}.jpg desc="Firefox File menu. It
should be properly localized into {1}."
22
23 # Open
the Firefox Preferences window.
24 # As
the File menu is open, key "arrow right" will display the Edit menu
25 # and
key "arrow up" will jump to the last menu item Preferences
26 Press
Right wait=500
27 Press
Up wait=500
28 Press
Enter wait=5s
29
Screenshot firefox-preferences-{1}.jpg desc="Firefox
Preferences window. It should be properly localized into {1}."
30
31 #
Escape will dispose the Preferences window
32 Press
Esc wait=500
33
34 #
Display the Firefox Search bar (F3 key) and open the Help window (F1).
35 Press
F3 wait=1s
36 Press
F1 wait=5s
37
Screenshot firefox-help-{1}.jpg desc="Firefox Help window
and the Search bar (at the bottom). It should be properly localized
into {1}."
38
39 #
Close the browser so that we can rerun the script safely
40 Press
Alt+F4 count=2 wait=1s
41 }
42
43 # Start an HTML
report
44 Report
index-{LANG}.html desc="Example of Robot automated localization
testing of Firefox. See the <a
href=http://www.t-plan.com/robot/docs/tutorials/MadCap/T-Plan_Robot_Enterprise_Tutorial_CSH.htm#localization>How
To Use Robot</a> document for the list of all examples."
45
46 # Call the test
procedure.
47 # Value of the
argument variable can be passed from CLI.
48 test_firefox {LANG}