Repository navigation
Expand file tree
/
Copy pathExcelExtract.robot
More file actions
367 lines (367 loc) · 16.7 KB
/
Copy pathExcelExtract.robot
File metadata and controls
367 lines (367 loc) · 16.7 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
<?xml version="1.0" encoding="UTF-8" ?>
<object class="GenericRobot2" serializationversion="2">
<prologue>
<saved-by-versions>
<version>9.3.0</version>
<version>9.4.0</version>
<version>9.7.0</version>
</saved-by-versions>
<referenced-types>
<type name="Person"/>
</referenced-types>
<referenced-snippets>
<snippet name="LoadHelp"/>
</referenced-snippets>
<typed-variables>
<typed-variable name="person" type-name="Person"/>
</typed-variables>
<global-variables/>
<parameters/>
<return-variables>
<variable name="person"/>
</return-variables>
<store-in-database-variables/>
<browser-engine>WEBKIT</browser-engine>
</prologue>
<property name="variables" class="Variables">
<object class="Variable" serializationversion="1">
<property name="name" class="String" id="0">person</property>
<property name="initialAssignment" class="InitialVariableAssignment">
<property name="type" class="TypeReference" serializationversion="0">
<property name="typeName" class="String">Person</property>
</property>
</property>
</object>
</property>
<property name="proxyServerConfiguration" class="ProxyServerConfiguration" serializationversion="0"/>
<property name="httpClientType" class="HttpClientType">
<property name="enum-name" class="String">WEBKIT</property>
</property>
<property name="ntlmAuthentication" class="NTLMAuthenticationType">
<property name="enum-name" class="String">STANDARD</property>
</property>
<property name="usePre96DefaultWaiting" class="Boolean" id="1">false</property>
<property name="maxWaitForTimeout" class="Integer">10000</property>
<property name="waitRealTime" idref="1"/>
<property name="privateHTTPCacheEnabled" class="Boolean" id="2">true</property>
<property name="privateHTTPCacheSize" class="Integer">2048</property>
<property name="comment">
<null/>
</property>
<property name="executionMode" class="ExecutionMode">
<property name="enum-name" class="String">DIRECT</property>
</property>
<property name="avoidExternalReExecution" idref="1"/>
<property name="transitionGraph" class="Body">
<blockBeginStep class="BlockBeginStep" id="3"/>
<steps class="ArrayList">
<object class="SnippetStep" id="4">
<name>
<null/>
</name>
<snippetName class="String">LoadHelp</snippetName>
<snippetStepComment>
<null/>
</snippetStepComment>
</object>
<object class="Transition" serializationversion="3" id="5">
<property name="name" class="String">CLICK HERE FIRST</property>
<property name="stepAction" class="DoNothing"/>
<property name="elementFinders" class="ElementFinders"/>
<property name="errorHandler" class="ErrorHandler" serializationversion="0"/>
<property name="comment">
<null/>
</property>
<property name="enabled" idref="2"/>
<property name="changedProperties" class="java.util.Collections$SingletonSet">
<element class="String" id="6">name</element>
</property>
</object>
<object class="Transition" serializationversion="3" id="7">
<property name="name" class="String">Click PersonData.xlsx</property>
<property name="stepAction" class="Click" serializationversion="0">
<property name="browserConfigurationSpecification" class="BrowserConfigurationSpecificationWebKit" serializationversion="22">
<property name="SSLUsage" class="com.kapowtech.net.ssl.SSLUsage">
<property name="useSSLv2Hello" class="Boolean">true</property>
<property name="useSSLv3" class="Boolean">true</property>
</property>
<property name="outputPageIfTimeoutEnabled" class="Boolean">false</property>
<property name="formatHandling" class="kapow.robot.plugin.common.support.browser2.LegacyFormatHandling">
<property name="jsonHandling" class="com.kapowtech.browser.documentparser.JSONHandling">
<property name="enum-name" class="String">TRANSFORM_TO_XML</property>
</property>
</property>
<property name="migrationNotes" class="kapow.robot.plugin.common.support.Text">
<property name="text" class="String">Default value changed: screenSize 800 x 600 -> 1280 x 1024
Default value changed: userAgentProvider Internet Explorer 8.0 on Windows 7 -> Chrome 27.0 on Windows 7
Default value changed: ignoreLoadErrors false -> true</property>
</property>
<property name="ancestorProvider" class="BrowserConfigurationSpecificationAncestorProviderForStep"/>
</property>
</property>
<property name="elementFinders" class="ElementFinders">
<object class="DefaultNamedElementAwareDOMElementFinder" serializationversion="4">
<property name="nodePath" class="kapow.robot.plugin.common.support.expression.stringexpr.ValueStringExpression">
<property name="value" class="String">.*.table.*.div.*.a</property>
</property>
</object>
</property>
<property name="errorHandler" class="ErrorHandler" serializationversion="0"/>
<property name="comment">
<null/>
</property>
<property name="enabled" idref="2"/>
<property name="changedProperties" class="java.util.Collections$SingletonSet">
<element idref="6"/>
</property>
</object>
<object class="Transition" serializationversion="3" id="8">
<property name="name" class="String">View as Excel</property>
<property name="stepAction" class="ViewAsExcel"/>
<property name="elementFinders" class="ElementFinders"/>
<property name="errorHandler" class="ErrorHandler" serializationversion="0"/>
<property name="comment">
<null/>
</property>
<property name="enabled" idref="2"/>
<property name="changedProperties" class="java.util.HashSet">
<element idref="6"/>
</property>
</object>
<object class="Transition" serializationversion="3" id="9">
<property name="name" class="String">Loop Rows</property>
<property name="stepAction" class="LoopInExcel">
<property name="loopDirection" class="LoopInExcel$LoopDirection">
<property name="enum-name" class="String">ROWS</property>
</property>
<property name="firstIndex" class="Integer">1</property>
</property>
<property name="elementFinders" class="ElementFinders">
<object class="ExcelElementFinder">
<property name="detail" class="SpecifiedRangeCellFinderDetail">
<property name="range" class="kapow.robot.plugin.common.support.expression.stringexpr.ValueStringExpression">
<property name="value" class="String">'Sheet1'!</property>
</property>
</property>
</object>
</property>
<property name="errorHandler" class="ErrorHandler" serializationversion="0"/>
<property name="comment">
<null/>
</property>
<property name="enabled" idref="2"/>
<property name="changedProperties" class="java.util.HashSet">
<element idref="6"/>
</property>
</object>
<object class="Transition" serializationversion="3" id="10">
<property name="name" class="String">Extract ID</property>
<property name="stepAction" class="ExtractCell">
<property name="dataConverters" class="DataConverters">
<element class="ExtractNumber"/>
</property>
<property name="attributeName" class="kapow.robot.plugin.common.support.AttributeName2">
<property name="name" class="String">person.ID</property>
</property>
</property>
<property name="elementFinders" class="ElementFinders">
<object class="ExcelElementFinder">
<property name="detail" class="NamedRangeCellFinderDetail">
<property name="rangeName" class="ElementName">
<property name="name" class="String">1</property>
</property>
<property name="usage" class="ColumnFromRange"/>
</property>
</object>
</property>
<property name="errorHandler" class="ErrorHandler" serializationversion="0"/>
<property name="comment">
<null/>
</property>
<property name="enabled" idref="2"/>
<property name="changedProperties" class="java.util.HashSet">
<element idref="6"/>
</property>
</object>
<object class="Transition" serializationversion="3" id="11">
<property name="name" class="String">Extract Name</property>
<property name="stepAction" class="ExtractCell">
<property name="dataConverters" class="DataConverters">
<element class="ReplacePattern">
<property name="pattern" class="kapow.robot.plugin.common.support.expression.stringexpr.PartialInputMatchingPatternValueStringExpression">
<property name="value" class="String">\s</property>
</property>
<property name="replaceExp" class="String">>> <<</property>
</element>
</property>
<property name="attributeName" class="kapow.robot.plugin.common.support.AttributeName2">
<property name="name" class="String">person.name</property>
</property>
</property>
<property name="elementFinders" class="ElementFinders">
<object class="ExcelElementFinder">
<property name="detail" class="NamedRangeCellFinderDetail">
<property name="rangeName" class="ElementName">
<property name="name" class="String">1</property>
</property>
<property name="usage" class="SpecifiedAreaFromRange">
<property name="columnId" class="ByIndexExcelColumnId">
<property name="offset" class="kapow.robot.plugin.common.support.expression.integerexpr.ValueIntegerExpression">
<property name="value" class="Integer">2</property>
</property>
</property>
<property name="width" class="AbsoluteExcelWidth">
<property name="columns" class="kapow.robot.plugin.common.support.expression.integerexpr.ValueIntegerExpression">
<property name="value" class="Integer">2</property>
</property>
</property>
<property name="height" class="AbsoluteExcelHeight"/>
</property>
</property>
</object>
</property>
<property name="errorHandler" class="ErrorHandler" serializationversion="0"/>
<property name="comment">
<null/>
</property>
<property name="enabled" idref="2"/>
<property name="changedProperties" class="java.util.HashSet">
<element idref="6"/>
</property>
</object>
<object class="Transition" serializationversion="3" id="12">
<property name="name" class="String">Extract Age</property>
<property name="stepAction" class="ExtractCell">
<property name="dataConverters" class="DataConverters">
<element class="ExtractNumber"/>
</property>
<property name="attributeName" class="kapow.robot.plugin.common.support.AttributeName2">
<property name="name" class="String">person.age</property>
</property>
</property>
<property name="elementFinders" class="ElementFinders">
<object class="ExcelElementFinder">
<property name="detail" class="NamedRangeCellFinderDetail">
<property name="rangeName" class="ElementName">
<property name="name" class="String">1</property>
</property>
<property name="usage" class="ColumnFromRange">
<property name="columnId" class="ByIndexExcelColumnId">
<property name="offset" class="kapow.robot.plugin.common.support.expression.integerexpr.ValueIntegerExpression">
<property name="value" class="Integer">6</property>
</property>
</property>
</property>
</property>
</object>
</property>
<property name="errorHandler" class="ErrorHandler" serializationversion="0"/>
<property name="comment">
<null/>
</property>
<property name="enabled" idref="2"/>
<property name="changedProperties" class="java.util.HashSet">
<element idref="6"/>
</property>
</object>
<object class="Transition" serializationversion="3" id="13">
<property name="name" class="String">Extract Gender</property>
<property name="stepAction" class="ExtractCell">
<property name="attributeName" class="kapow.robot.plugin.common.support.AttributeName2">
<property name="name" class="String">person.isMale</property>
</property>
</property>
<property name="elementFinders" class="ElementFinders">
<object class="ExcelElementFinder">
<property name="detail" class="NamedRangeCellFinderDetail">
<property name="rangeName" class="ElementName">
<property name="name" class="String">1</property>
</property>
<property name="usage" class="ColumnFromRange">
<property name="columnId" class="ByIndexExcelColumnId">
<property name="offset" class="kapow.robot.plugin.common.support.expression.integerexpr.ValueIntegerExpression">
<property name="value" class="Integer">4</property>
</property>
</property>
</property>
</property>
</object>
</property>
<property name="errorHandler" class="ErrorHandler" serializationversion="0"/>
<property name="comment">
<null/>
</property>
<property name="enabled" idref="2"/>
<property name="changedProperties" class="java.util.Collections$SingletonSet">
<element idref="6"/>
</property>
</object>
<object class="Transition" serializationversion="3" id="14">
<property name="name" class="String">Return Value</property>
<property name="stepAction" class="ReturnVariable" serializationversion="1">
<property name="variableName" class="kapow.robot.plugin.common.support.VariableName">
<property name="name" idref="0"/>
</property>
</property>
<property name="elementFinders" class="ElementFinders"/>
<property name="errorHandler" class="ErrorHandler" serializationversion="0"/>
<property name="comment">
<null/>
</property>
<property name="enabled" idref="2"/>
<property name="changedProperties" class="java.util.HashSet">
<element idref="6"/>
</property>
</object>
<object class="End" id="15"/>
</steps>
<blockEndStep class="BlockEndStep"/>
<edges class="ArrayList">
<object class="TransitionEdge">
<from idref="3"/>
<to idref="4"/>
</object>
<object class="TransitionEdge">
<from idref="4"/>
<to idref="5"/>
</object>
<object class="TransitionEdge">
<from idref="5"/>
<to idref="7"/>
</object>
<object class="TransitionEdge">
<from idref="7"/>
<to idref="8"/>
</object>
<object class="TransitionEdge">
<from idref="8"/>
<to idref="9"/>
</object>
<object class="TransitionEdge">
<from idref="9"/>
<to idref="10"/>
</object>
<object class="TransitionEdge">
<from idref="10"/>
<to idref="11"/>
</object>
<object class="TransitionEdge">
<from idref="11"/>
<to idref="12"/>
</object>
<object class="TransitionEdge">
<from idref="12"/>
<to idref="13"/>
</object>
<object class="TransitionEdge">
<from idref="13"/>
<to idref="14"/>
</object>
<object class="TransitionEdge">
<from idref="14"/>
<to idref="15"/>
</object>
</edges>
</property>
<property name="browserConfigurationSpecification" class="BrowserConfigurationSpecificationWebKit" serializationversion="22"/>
</object>