1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package net.sf.jameleon.plugin.selenium.tags;
20
21 /***
22 * Gets a specific attribute from all windows.
23 *
24 * To get the window titles:
25 * <pre><source>
26 * <selenium-get-attribute-from-all-windows
27 * functionId="Get all window titles."
28 * attribute="document.title"
29 * contextVariable="allTitles" />
30 *
31 * <ju-assert-equals
32 * functionId="Make sure the first title of the first window is 'My Page Title'"
33 * expected="My Page Title"
34 * actual="${allTitles.get(0)}" />
35 * </source></pre>
36 * Examples include id, document.title, name
37 * @jameleon.function name="selenium-get-attribute-from-all-windows" type="action"
38 */
39 public class SeleniumGetAttributeFromAllWindowsTag extends AbstractSeleniumGetStringsFunctionTag{
40
41 /***
42 * The attribute to get from all windows.
43 * Examples include title, id, name
44 * @jameleon.attribute required="true"
45 */
46 protected String attribute;
47
48 public String[] getStrings(){
49 return session.getAttributeFromAllWindows(attribute);
50 }
51
52 }