ยปCore Development>Code coverage>Lib/plat-mac/lib-scriptpackages/Explorer/Web_Browser_Suite.py

Python code coverage for Lib/plat-mac/lib-scriptpackages/Explorer/Web_Browser_Suite.py

#countcontent
1n/a"""Suite Web Browser Suite: Class of events supported by Web Browser applications
2n/aLevel 1, version 1
3n/a
4n/aGenerated from /Applications/Internet Explorer.app
5n/aAETE/AEUT resource version 1/0, language 0, script 0
6n/a"""
7n/a
8n/aimport aetools
9n/aimport MacOS
10n/a
11n/a_code = 'WWW!'
12n/a
13n/aclass Web_Browser_Suite_Events:
14n/a
15n/a def Activate(self, _object=None, _attributes={}, **_arguments):
16n/a """Activate: Activate Internet Explorer and optionally select window designated by Window Identifier.
17n/a Required argument: Window Identifier
18n/a Keyword argument _attributes: AppleEvent attribute dictionary
19n/a Returns: Window Identifier of window to activate
20n/a """
21n/a _code = 'WWW!'
22n/a _subcode = 'ACTV'
23n/a
24n/a if _arguments: raise TypeError, 'No optional args expected'
25n/a _arguments['----'] = _object
26n/a
27n/a
28n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
29n/a _arguments, _attributes)
30n/a if _arguments.get('errn', 0):
31n/a raise aetools.Error, aetools.decodeerror(_arguments)
32n/a # XXXX Optionally decode result
33n/a if _arguments.has_key('----'):
34n/a return _arguments['----']
35n/a
36n/a def CloseAllWindows(self, _no_object=None, _attributes={}, **_arguments):
37n/a """CloseAllWindows: Closes all windows
38n/a Keyword argument _attributes: AppleEvent attribute dictionary
39n/a Returns: Success
40n/a """
41n/a _code = 'WWW!'
42n/a _subcode = 'CLSA'
43n/a
44n/a if _arguments: raise TypeError, 'No optional args expected'
45n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
46n/a
47n/a
48n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
49n/a _arguments, _attributes)
50n/a if _arguments.get('errn', 0):
51n/a raise aetools.Error, aetools.decodeerror(_arguments)
52n/a # XXXX Optionally decode result
53n/a if _arguments.has_key('----'):
54n/a return _arguments['----']
55n/a
56n/a _argmap_CloseWindow = {
57n/a 'ID' : 'WIND',
58n/a 'Title' : 'TITL',
59n/a }
60n/a
61n/a def CloseWindow(self, _no_object=None, _attributes={}, **_arguments):
62n/a """CloseWindow: Close the window specified by either Window Identifier or Title. If no parameter is specified, close the top window.
63n/a Keyword argument ID: ID of the window to close. (Can use -1 for top window)
64n/a Keyword argument Title: Title of the window to close
65n/a Keyword argument _attributes: AppleEvent attribute dictionary
66n/a Returns: Success
67n/a """
68n/a _code = 'WWW!'
69n/a _subcode = 'CLOS'
70n/a
71n/a aetools.keysubst(_arguments, self._argmap_CloseWindow)
72n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
73n/a
74n/a
75n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
76n/a _arguments, _attributes)
77n/a if _arguments.get('errn', 0):
78n/a raise aetools.Error, aetools.decodeerror(_arguments)
79n/a # XXXX Optionally decode result
80n/a if _arguments.has_key('----'):
81n/a return _arguments['----']
82n/a
83n/a def GetWindowInfo(self, _object, _attributes={}, **_arguments):
84n/a """GetWindowInfo: Returns a window info record (URL/Title) for the specified window.
85n/a Required argument: Window Identifier of the window
86n/a Keyword argument _attributes: AppleEvent attribute dictionary
87n/a Returns:
88n/a """
89n/a _code = 'WWW!'
90n/a _subcode = 'WNFO'
91n/a
92n/a if _arguments: raise TypeError, 'No optional args expected'
93n/a _arguments['----'] = _object
94n/a
95n/a
96n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
97n/a _arguments, _attributes)
98n/a if _arguments.get('errn', 0):
99n/a raise aetools.Error, aetools.decodeerror(_arguments)
100n/a # XXXX Optionally decode result
101n/a if _arguments.has_key('----'):
102n/a return _arguments['----']
103n/a
104n/a def ListWindows(self, _no_object=None, _attributes={}, **_arguments):
105n/a """ListWindows: Returns list of Window Identifiers for all open windows.
106n/a Keyword argument _attributes: AppleEvent attribute dictionary
107n/a Returns: undocumented, typecode 'list'
108n/a """
109n/a _code = 'WWW!'
110n/a _subcode = 'LSTW'
111n/a
112n/a if _arguments: raise TypeError, 'No optional args expected'
113n/a if _no_object is not None: raise TypeError, 'No direct arg expected'
114n/a
115n/a
116n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
117n/a _arguments, _attributes)
118n/a if _arguments.get('errn', 0):
119n/a raise aetools.Error, aetools.decodeerror(_arguments)
120n/a # XXXX Optionally decode result
121n/a if _arguments.has_key('----'):
122n/a return _arguments['----']
123n/a
124n/a _argmap_OpenURL = {
125n/a 'to' : 'INTO',
126n/a 'toWindow' : 'WIND',
127n/a 'Flags' : 'FLGS',
128n/a 'FormData' : 'POST',
129n/a 'MIME_Type' : 'MIME',
130n/a }
131n/a
132n/a def OpenURL(self, _object, _attributes={}, **_arguments):
133n/a """OpenURL: Retrieves URL off the Web.
134n/a Required argument: Fully-qualified URL
135n/a Keyword argument to: Target file for saving downloaded data
136n/a Keyword argument toWindow: Target window for resource at URL (-1 for top window, 0 for new window)
137n/a Keyword argument Flags: Valid Flags settings are: 1-Ignore the document cache; 2-Ignore the image cache; 4-Operate in background mode.
138n/a Keyword argument FormData: data to post
139n/a Keyword argument MIME_Type: MIME type of data being posted
140n/a Keyword argument _attributes: AppleEvent attribute dictionary
141n/a """
142n/a _code = 'WWW!'
143n/a _subcode = 'OURL'
144n/a
145n/a aetools.keysubst(_arguments, self._argmap_OpenURL)
146n/a _arguments['----'] = _object
147n/a
148n/a
149n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
150n/a _arguments, _attributes)
151n/a if _arguments.get('errn', 0):
152n/a raise aetools.Error, aetools.decodeerror(_arguments)
153n/a # XXXX Optionally decode result
154n/a if _arguments.has_key('----'):
155n/a return _arguments['----']
156n/a
157n/a _argmap_ParseAnchor = {
158n/a 'withURL' : 'RELA',
159n/a }
160n/a
161n/a def ParseAnchor(self, _object, _attributes={}, **_arguments):
162n/a """ParseAnchor: Combines a base URL and a relative URL to produce a fully-qualified URL
163n/a Required argument: Base URL
164n/a Keyword argument withURL: Relative URL that is combined with the Base URL (in the direct object) to produce a fully-qualified URL.
165n/a Keyword argument _attributes: AppleEvent attribute dictionary
166n/a Returns: Fully-qualified URL
167n/a """
168n/a _code = 'WWW!'
169n/a _subcode = 'PRSA'
170n/a
171n/a aetools.keysubst(_arguments, self._argmap_ParseAnchor)
172n/a _arguments['----'] = _object
173n/a
174n/a
175n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
176n/a _arguments, _attributes)
177n/a if _arguments.get('errn', 0):
178n/a raise aetools.Error, aetools.decodeerror(_arguments)
179n/a # XXXX Optionally decode result
180n/a if _arguments.has_key('----'):
181n/a return _arguments['----']
182n/a
183n/a _argmap_ShowFile = {
184n/a 'MIME_Type' : 'MIME',
185n/a 'Window_Identifier' : 'WIND',
186n/a 'URL' : 'URL ',
187n/a }
188n/a
189n/a def ShowFile(self, _object, _attributes={}, **_arguments):
190n/a """ShowFile: FileSpec containing data of specified MIME type to be rendered in window specified by Window Identifier.
191n/a Required argument: The file
192n/a Keyword argument MIME_Type: MIME type
193n/a Keyword argument Window_Identifier: Identifier of the target window for the URL. (Can use -1 for top window)
194n/a Keyword argument URL: URL that allows this document to be reloaded.
195n/a Keyword argument _attributes: AppleEvent attribute dictionary
196n/a """
197n/a _code = 'WWW!'
198n/a _subcode = 'SHWF'
199n/a
200n/a aetools.keysubst(_arguments, self._argmap_ShowFile)
201n/a _arguments['----'] = _object
202n/a
203n/a
204n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
205n/a _arguments, _attributes)
206n/a if _arguments.get('errn', 0):
207n/a raise aetools.Error, aetools.decodeerror(_arguments)
208n/a # XXXX Optionally decode result
209n/a if _arguments.has_key('----'):
210n/a return _arguments['----']
211n/a
212n/a
213n/a#
214n/a# Indices of types declared in this module
215n/a#
216n/a_classdeclarations = {
217n/a}
218n/a
219n/a_propdeclarations = {
220n/a}
221n/a
222n/a_compdeclarations = {
223n/a}
224n/a
225n/a_enumdeclarations = {
226n/a}