/
secop2modificacion
388 lines (366 loc) · 7.71 KB
/
secop2modificacion
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
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
// cargar datos
load Base_de_datos_Contratacion.csv to lista
array_lista = lista.split('\n')
// iniciar variables
ask usuario?
usuario = ask_result
ask contraseña?
pass = ask_result
espera = 10
enlace = 0
// accceder página
https://community.secop.gov.co/STS/Users/Login/Index?SkinName=CCE
wait 5
type txtUserName as '+usuario+'
type txtPassword as '+pass+'
click btnLoginButton
for (n = 1; n < espera; n++)
{
if present('//*[@id="seldpCompany"]/*[@value="702729500"]')
{
break
}
wait 5
}
select seldpCompany as 701234567
wait 2
click btnButton1
for (n = 1; n < espera; n++)
{
wait 5
if present('btnAcknowledgeGen')
{
break
}
if present('//*[@value="Procesos"]')
{
break
}
}
// mensaje informativo
if present('btnAcknowledgeGen')
{
click btnAcknowledgeGen
wait 5
}
//for (x = 1; x < 2; x++)
for (x = 1; x < array_lista.length; x++)
{
items = array_lista[x].split('|')
numproceso = items[0]
codigo_rubro = items[9]
fecha_final = items[18]
valor_total = items[19]
clase1 = items[20]
adicion1 = items[24]
cdp1 = items[27]
crp1 = items[29]
clase2 = items[31]
adicion2 = items[35]
cdp2 = items[38]
crp2 = items[40]
clase3 = items[42]
adicion3 = items[46]
cdp3 = items[49]
crp3 = items[51]
echo "------------------------------------ inicio proceso " numproceso
// aprobar proceso
for (n = 1; n < espera; n++)
{
if present('//*[@value="Procesos"]')
{
break
}
wait 5
}
click //*[@value="Procesos"]
click lnkSubItem6
for (n = 1; n < espera; n++)
{
wait 5
if present('txtSimpleSearchInput')
{
break
}
}
type txtSimpleSearchInput as CPS-'+numproceso+'-2019[enter]
wait 5
click //*[@id="selFilteringStatesSel_msdd"]//*[@class="ddArrow arrowoff"]
vision type(Key.UP)
vision type(Key.ENTER)
wait 5
click //*[@title="CPS-'+numproceso+'-2019"]
for (n = 1; n < espera; n++)
{
wait 5
if present('incBuyerDossierDetaillnkBuyerDossierDetailLink')
{
break
}
click //*[@title="CPS-'+numproceso+'-2019"]
}
click lnkProcurementContractViewLink_0
// 1 modificacion del contrato
for (n = 1; n < espera; n++)
{
wait 5
if present('//*[@id="stepCircleSelected_1"][@class="MainColor4 circle22 Black stepOn"]')
{
break
}
click stepCircle_2
}
click btnMakeModification
for (n = 1; n < espera; n++)
{
wait 5
if present('lnkModifyContractGeneralLink')
{
break
}
}
click lnkModifyContractGeneralLink
for (n = 1; n < espera; n++)
{
wait 5
frame ProcurementContractModificationConfirmCreateTypeModal_iframe
{
if present('btnConfirmGen')
{
break
}
}
}
frame ProcurementContractModificationConfirmCreateTypeModal_iframe
{
type btnConfirmGen as ""
vision type(Key.SPACE)
}
wait 5
// 2 informacion general
click stepCircle_2
for (n = 1; n < espera; n++)
{
wait 5
if present('//*[@id="stepCircleSelected_2"][@class="MainColor4 circle22 Black stepOn"]')
{
break
}
click stepCircle_2
}
type dtmbContractEnd_txt as [clear]'+fecha_final+'" 23:59"
// 3 condiciones
click stepCircle_3
for (n = 1; n < espera; n++)
{
wait 5
if present('//*[@id="stepCircleSelected_3"][@class="MainColor4 circle22 Black stepOn"]')
{
break
}
click stepCircle_3
}
type dtmbDeliverEndDateGen_txt as [clear]'+fecha_final+'" 23:59"
type dtmbContractRenewalDateGen_txt as [clear]'+fecha_final+'" 23:59"
// 4 bienes y servicios
click stepCircle_4
for (n = 1; n < espera; n++)
{
wait 5
if present('//*[@id="stepCircleSelected_4"][@class="MainColor4 circle22 Black stepOn"]')
{
break
}
click stepCircle_4
}
wait 5
click //*[@id="incCatalogueItemsfltDataSheet"]/table/tbody/tr[2]/td[4]
wait 2
dclick //*[@id="incCatalogueItemsfltDataSheet"]/table/tbody/tr[5]/td[5]/table/tbody/tr/td/table/tbody/tr[1]/td[7]/input
type //*[@id="incCatalogueItemsfltDataSheet"]/table/tbody/tr[5]/td[5]/table/tbody/tr/td/table/tbody/tr[1]/td[7]/input as '+valor_total+'
// 7 informacion presupuestal
click stepCircle_7
for (n = 1; n < espera; n++)
{
wait 5
if present('//*[@id="stepCircleSelected_7"][@class="MainColor4 circle22 Black stepOn"]')
{
break
}
click stepCircle_7
}
for (clasen = 1; clasen <= 3; clasen++)
{
if (clasen == 1)
{
clase = clase1
adicion = adicion1
cdp = cdp1
crp = crp1
}
if (clasen == 2)
{
clase = clase2
adicion = adicion2
cdp = cdp2
crp = crp2
}
if (clasen == 3)
{
clase = clase3
adicion = adicion3
cdp = cdp3
crp = crp3
}
if ((clase == "adicion") || (clase == "adicion y prorroga"))
{
click btnAddCode
for (n = 1; n < espera; n++)
{
wait 5
frame SIIFModal_iframe
{
if present('rdbgOptionsToSelectRadioButton_0')
{
break
}
}
}
frame SIIFModal_iframe
{
type rdbgOptionsToSelectRadioButton_0 as ""
vision type(Key.SPACE)
wait 5
type txtSIIFIntegrationItemTextbox as '+cdp+'
type cbxSIIFIntegrationItemUsedValueTextbox as '+adicion+'
type txtSIIFIntegrationItemPCICodebox as '+codigo_rubro+'
type btnSIIFIntegrationItemButton as ""
vision type(Key.SPACE)
}
wait 10
click btnCommitmentAddCode
for (n = 1; n < espera; n++)
{
wait 5
frame SIIFModal_iframe
{
if present('rdbgOptionsToSelectRadioButton_0')
{
break
}
}
}
frame SIIFModal_iframe
{
type rdbgOptionsToSelectRadioButton_0 as ""
vision type(Key.SPACE)
wait 5
type txtSIIFCommitmentIntegrationItemTextbox as '+crp+'
type cbxSIIFCommitmentIntegrationItemBalanceTextbox as '+adicion+'
type selRelatedBudgetValue as ""
vision type(Key.SPACE)
vision_step('cdp = "' + cdp + '"')
vision type(cdp)
vision type(Key.ENTER)
type btnSIIFCommitmentIntegrationItemButton as ""
vision type(Key.SPACE)
}
wait 10
}
}
// 1 modificacion del contrato
click stepCircle_1
for (n = 1; n < espera; n++)
{
wait 5
if present('//*[@id="stepCircleSelected_1"][@class="MainColor4 circle22 Black stepOn"]')
{
break
}
click stepCircle_1
}
for (clasen = 1; clasen <= 3; clasen++)
{
if (clasen == 1)
{
clase = clase1
adicion = adicion1
cdp = cdp1
crp = crp1
}
if (clasen == 2)
{
clase = clase2
adicion = adicion2
cdp = cdp2
crp = crp2
}
if (clasen == 3)
{
clase = clase3
adicion = adicion3
cdp = cdp3
crp = crp3
}
if (clase != "")
{
click cmAttachmentsOptions
vision type(Key.TAB)
vision type(Key.ENTER)
popup DocumentAlternateUpload
{
click divAddFilesButton
vision_step('numproceso = "' + numproceso + '"')
vision_step('clasen = "' + clasen + '"')
vision type("C:\\secop2\\documentos\\OTROSI-" + clasen + "-CPS-" + numproceso + "-2019.pdf")
vision type(Key.ENTER)
wait 5
click btnUploadFilesButtonBottom
for (n = 1; n < espera; n++)
{
wait 5
if present('//*[@id="tblFilesTable"]//*[@processed="success"]')
{
break
}
}
click btnCancelBottomButtom
}
wait 10
}
}
type txaModificationPurpose as modificacion
// finalizar modificacion
click btnOption_tbContractToolbar_Finish
wait 5
type chkCheckBoxAgreeTerms as ""
vision type(Key.SPACE)
wait 5
type btnContractTotalValueValidationConfirmDialogModal as ""
vision type(Key.SPACE)
for (n = 1; n < espera; n++)
{
wait 5
frame StartApprovalSupportModal_iframe
{
if present('btnConfirmGen')
{
break
}
}
}
frame StartApprovalSupportModal_iframe
{
type btnConfirmGen as ""
vision type(Key.SPACE)
}
for (n = 1; n < espera; n++)
{
wait 5
if present('IncTaskApproval_spnThisDocumentIsWaitingForAWorkfGen')
{
break
}
}
}
wait 60