sfdc_se 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/sfdc_se.rb +194 -0
- data/lib/sfdc_se/general/general.rb +78 -0
- data/lib/sfdc_se/pages/page_deliverability.rb +56 -0
- data/lib/sfdc_se/pages/page_emailalerts.rb +332 -0
- data/lib/sfdc_se/pages/page_fieldupdates.rb +499 -0
- data/lib/sfdc_se/pages/page_homepagelayouts.rb +128 -0
- data/lib/sfdc_se/pages/page_passwordsecuritysetting.rb +61 -0
- data/lib/sfdc_se/pages/page_personalinformation.rb +18 -0
- data/lib/sfdc_se/pages/page_profiles.rb +780 -0
- data/lib/sfdc_se/pages/page_renametabslabels.rb +1215 -0
- data/lib/sfdc_se/pages/page_setup.rb +321 -0
- data/lib/sfdc_se/pages/page_sharingsettings.rb +264 -0
- data/lib/sfdc_se/pages/page_template.rb +18 -0
- data/lib/sfdc_se/pages/page_translate.rb +451 -0
- data/lib/sfdc_se/version.rb +3 -0
- metadata +106 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
# ----------------------------------------------
|
2
|
+
# - Page: <Template Page Name>
|
3
|
+
# ----------------------------------------------
|
4
|
+
|
5
|
+
module SfdcSe
|
6
|
+
class Driver
|
7
|
+
|
8
|
+
def click_<name>
|
9
|
+
# -- <description>
|
10
|
+
@driver.find_element(:id => '<id value>').click
|
11
|
+
end
|
12
|
+
|
13
|
+
def navigate_<name>
|
14
|
+
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,451 @@
|
|
1
|
+
# ----------------------------------------------
|
2
|
+
# - Page: Translate
|
3
|
+
# ----------------------------------------------
|
4
|
+
|
5
|
+
module SfdcSe
|
6
|
+
class Driver
|
7
|
+
|
8
|
+
# -----------------------------
|
9
|
+
# get_Translate_Language
|
10
|
+
# => returns all the elements for the Translate Language dropdown
|
11
|
+
#
|
12
|
+
def get_Translate_Language
|
13
|
+
return @driver.find_elements(:xpath => "//div[@id='twb:theForm:filterBlock:filterPageBlock']/div/table/tbody/tr[1]/td/span/select/option")
|
14
|
+
end
|
15
|
+
# -----------------------------
|
16
|
+
|
17
|
+
# -----------------------------
|
18
|
+
# get_Translate_SetupComponent
|
19
|
+
# => returns all the elements for the Translate Setup Comonent dropdown
|
20
|
+
#
|
21
|
+
def get_Translate_SetupComponent
|
22
|
+
return @driver.find_elements(:xpath => "//div[@id='twb:theForm:filterBlock:filterPageBlock']/div/table/tbody/tr[2]/td/span/select/option")
|
23
|
+
end
|
24
|
+
# -----------------------------
|
25
|
+
|
26
|
+
# -----------------------------
|
27
|
+
# get_Translate_CustomReportTypeEntity
|
28
|
+
# => returns all the elements for the Translate Custom Report Type Entity dropdown
|
29
|
+
#
|
30
|
+
def get_Translate_CustomReportTypeEntity
|
31
|
+
return @driver.find_elements(:xpath => "//div[@id='twb:theForm:filterBlock:filterPageBlock']/div/table/tbody/tr[3]/td/span/select/option")
|
32
|
+
end
|
33
|
+
# -----------------------------
|
34
|
+
|
35
|
+
# -----------------------------
|
36
|
+
# get_Translate_Aspect
|
37
|
+
# => returns all the elements for the Translate Aspect dropdown
|
38
|
+
#
|
39
|
+
def get_Translate_Aspect
|
40
|
+
return @driver.find_elements(:xpath => "//div[@id='twb:theForm:filterBlock:filterPageBlock']/div/table/tbody/tr[4]/td/span/select/option")
|
41
|
+
end
|
42
|
+
# -----------------------------
|
43
|
+
|
44
|
+
# -----------------------------
|
45
|
+
# get_Translate_CustomReportType_FieldLabel_rows
|
46
|
+
# => returns all the elements for the Translate Custom Report Type - Field Label rows
|
47
|
+
#
|
48
|
+
def get_Translate_CustomReportType_FieldLabel_rows
|
49
|
+
return @driver.find_elements(:xpath => "//div[@id='gridID']/div[1]/div[2]/div[1]/div[1]/div[2]/div/div")
|
50
|
+
end
|
51
|
+
# -----------------------------
|
52
|
+
|
53
|
+
# -----------------------------
|
54
|
+
# get_btn_Translate_CustomReportType_FieldLabel_Next
|
55
|
+
# => returns the element for the Translate Custom Report Type - Field Label Next button
|
56
|
+
#
|
57
|
+
def get_btn_Translate_CustomReportType_FieldLabel_Next
|
58
|
+
return @driver.find_element(:xpath => "//table[@id='nextTextBtn']/tbody/tr[2]/td[2]/em/button")
|
59
|
+
end
|
60
|
+
# -----------------------------
|
61
|
+
|
62
|
+
# -----------------------------
|
63
|
+
# click_btn_Translate_Save
|
64
|
+
#
|
65
|
+
def click_btn_Translate_Save
|
66
|
+
@driver.find_element(:xpath => "//table[@id = 'saveBtn']/tbody/tr[2]/td[2]/em/button").click
|
67
|
+
sleep(5)
|
68
|
+
end
|
69
|
+
# -----------------------------
|
70
|
+
|
71
|
+
# -----------------------------
|
72
|
+
# set_Translation_Language
|
73
|
+
# => sLanguage = string value of the Translate Language option to select
|
74
|
+
# => Return = true or false
|
75
|
+
# => true = setting of view were successful
|
76
|
+
# => false = setting of view had an error
|
77
|
+
#
|
78
|
+
def set_Translation_Language(sLanguage)
|
79
|
+
blnReturn=false
|
80
|
+
|
81
|
+
begin
|
82
|
+
get_Translate_Language.each do |option|
|
83
|
+
if option.text == sLanguage
|
84
|
+
option.click unless option.selected?
|
85
|
+
blnReturn=true
|
86
|
+
sleep(3)
|
87
|
+
break
|
88
|
+
end
|
89
|
+
end
|
90
|
+
rescue
|
91
|
+
puts $!
|
92
|
+
puts $@
|
93
|
+
end
|
94
|
+
return blnReturn
|
95
|
+
end
|
96
|
+
# -----------------------------
|
97
|
+
|
98
|
+
# -----------------------------
|
99
|
+
# set_Translation_SetupComponent
|
100
|
+
# => sComponentName = string value of the Translate Setup Component option to select
|
101
|
+
# => Return = true or false
|
102
|
+
# => true = setting of view were successful
|
103
|
+
# => false = setting of view had an error
|
104
|
+
#
|
105
|
+
def set_Translation_SetupComponent(sComponentName)
|
106
|
+
blnReturn=false
|
107
|
+
|
108
|
+
begin
|
109
|
+
get_Translate_SetupComponent.each do |option|
|
110
|
+
if option.text == sComponentName
|
111
|
+
option.click unless option.selected?
|
112
|
+
blnReturn=true
|
113
|
+
sleep(3)
|
114
|
+
break
|
115
|
+
end
|
116
|
+
end
|
117
|
+
rescue
|
118
|
+
puts $!
|
119
|
+
puts $@
|
120
|
+
end
|
121
|
+
return blnReturn
|
122
|
+
end
|
123
|
+
# -----------------------------
|
124
|
+
|
125
|
+
# -----------------------------
|
126
|
+
# set_Translation_CustomReportTypeEntity
|
127
|
+
# => sEntityType = string value of the Translate Custom Report Type Entity option to select
|
128
|
+
# => Return = true or false
|
129
|
+
# => true = setting of view were successful
|
130
|
+
# => false = setting of view had an error
|
131
|
+
#
|
132
|
+
def set_Translation_CustomReportTypeEntity(sEntityType)
|
133
|
+
blnReturn=false
|
134
|
+
|
135
|
+
begin
|
136
|
+
get_Translate_CustomReportTypeEntity.each do |option|
|
137
|
+
if option.text == sEntityType
|
138
|
+
option.click unless option.selected?
|
139
|
+
blnReturn=true
|
140
|
+
sleep(3)
|
141
|
+
break
|
142
|
+
end
|
143
|
+
end
|
144
|
+
rescue
|
145
|
+
puts $!
|
146
|
+
puts $@
|
147
|
+
end
|
148
|
+
return blnReturn
|
149
|
+
end
|
150
|
+
# -----------------------------
|
151
|
+
|
152
|
+
#-----------------------------
|
153
|
+
# set_Translation_Aspect
|
154
|
+
# => sAspect = string value of the Translate Aspect option to select
|
155
|
+
# => Return = true or false
|
156
|
+
# => true = setting of view were successful
|
157
|
+
# => false = setting of view had an error
|
158
|
+
#
|
159
|
+
def set_Translation_Aspect(sAspect)
|
160
|
+
blnReturn=false
|
161
|
+
|
162
|
+
begin
|
163
|
+
get_Translate_Aspect.each do |option|
|
164
|
+
if option.text == sAspect
|
165
|
+
option.click unless option.selected?
|
166
|
+
blnReturn=true
|
167
|
+
sleep(3)
|
168
|
+
break
|
169
|
+
end
|
170
|
+
end
|
171
|
+
rescue
|
172
|
+
puts $!
|
173
|
+
puts $@
|
174
|
+
end
|
175
|
+
return blnReturn
|
176
|
+
end
|
177
|
+
# -----------------------------
|
178
|
+
|
179
|
+
# -----------------------------
|
180
|
+
# get_Translation_CustomReportType_FieldLabel
|
181
|
+
# => Return = Hash {Key= Field Name/Type, Value=Field Value}
|
182
|
+
#
|
183
|
+
def get_Translation_CustomReportType_FieldLabel(sCustomReportTypeName)
|
184
|
+
response=Hash.new
|
185
|
+
blnFound=false
|
186
|
+
idx=0
|
187
|
+
|
188
|
+
until (@driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i and idx==@driver.find_element(:id => 'totalPages').text.to_i) or blnFound==true
|
189
|
+
r=0
|
190
|
+
while r < get_Translate_CustomReportType_FieldLabel_rows.length
|
191
|
+
if get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[1]/div").text == sCustomReportTypeName
|
192
|
+
response["translation"]=get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[2]/div").text
|
193
|
+
# response["out of Date"]=get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[4]/div/div/input").selected? #attribute("checked")
|
194
|
+
blnFound=true
|
195
|
+
break
|
196
|
+
end
|
197
|
+
r+=1
|
198
|
+
end
|
199
|
+
idx+=1
|
200
|
+
if blnFound==false
|
201
|
+
get_btn_Translate_CustomReportType_FieldLabel_Next.click unless @driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i
|
202
|
+
sleep(5)
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
return response
|
207
|
+
end
|
208
|
+
# -----------------------------
|
209
|
+
|
210
|
+
# -----------------------------
|
211
|
+
# set_Translation_CustomReportType_FieldLabel
|
212
|
+
# => Return = true/false
|
213
|
+
#
|
214
|
+
def set_Translation_CustomReportType_FieldLabel(sCustomReportTypeName, sTranslationValue)
|
215
|
+
blnReturn=false
|
216
|
+
blnFound=false
|
217
|
+
idx=0
|
218
|
+
|
219
|
+
until (@driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i and idx==@driver.find_element(:id => 'totalPages').text.to_i) or blnFound==true
|
220
|
+
r=0
|
221
|
+
while r < get_Translate_CustomReportType_FieldLabel_rows.length
|
222
|
+
if get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[1]/div").text == sCustomReportTypeName
|
223
|
+
if !(get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[2]/div").text == sTranslationValue)
|
224
|
+
@driver.action.double_click(get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[2]/div")).perform
|
225
|
+
@driver.find_element(:id => "txtEdField").clear()
|
226
|
+
@driver.find_element(:id => "txtEdField").send_keys(sTranslationValue)
|
227
|
+
blnReturn=true
|
228
|
+
end
|
229
|
+
blnFound=true
|
230
|
+
break
|
231
|
+
end
|
232
|
+
r+=1
|
233
|
+
end
|
234
|
+
idx+=1
|
235
|
+
if blnFound==false
|
236
|
+
get_btn_Translate_CustomReportType_FieldLabel_Next.click unless @driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i
|
237
|
+
sleep(5)
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
return blnReturn
|
242
|
+
end
|
243
|
+
# -----------------------------
|
244
|
+
|
245
|
+
# -----------------------------
|
246
|
+
# get_Translation_CustomReportType_Description
|
247
|
+
# => Return = Hash {Key= Field Name/Type, Value=Field Value}
|
248
|
+
#
|
249
|
+
def get_Translation_CustomReportType_Description(sCustomReportTypeName)
|
250
|
+
response=Hash.new
|
251
|
+
blnFound=false
|
252
|
+
idx=0
|
253
|
+
|
254
|
+
until (@driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i and idx==@driver.find_element(:id => 'totalPages').text.to_i) or blnFound==true
|
255
|
+
r=0
|
256
|
+
while r < get_Translate_CustomReportType_FieldLabel_rows.length
|
257
|
+
if get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[1]/div").text == sCustomReportTypeName
|
258
|
+
response["translation"]=get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[2]/div").text
|
259
|
+
# response["out of Date"]=get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[4]/div/div/input").selected? #attribute("checked")
|
260
|
+
blnFound=true
|
261
|
+
break
|
262
|
+
end
|
263
|
+
r+=1
|
264
|
+
end
|
265
|
+
idx+=1
|
266
|
+
if blnFound==false
|
267
|
+
get_btn_Translate_CustomReportType_FieldLabel_Next.click unless @driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i
|
268
|
+
sleep(5)
|
269
|
+
end
|
270
|
+
end
|
271
|
+
|
272
|
+
return response
|
273
|
+
end
|
274
|
+
# -----------------------------
|
275
|
+
|
276
|
+
# -----------------------------
|
277
|
+
# set_Translation_CustomReportType_Description
|
278
|
+
# => Return = true/false
|
279
|
+
#
|
280
|
+
def set_Translation_CustomReportType_Description(sCustomReportTypeName, sTranslationValue)
|
281
|
+
blnReturn=false
|
282
|
+
blnFound=false
|
283
|
+
idx=0
|
284
|
+
|
285
|
+
until (@driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i and idx==@driver.find_element(:id => 'totalPages').text.to_i) or blnFound==true
|
286
|
+
r=0
|
287
|
+
while r < get_Translate_CustomReportType_FieldLabel_rows.length
|
288
|
+
if get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[1]/div").text == sCustomReportTypeName
|
289
|
+
if !(get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[2]/div").text == sTranslationValue)
|
290
|
+
@driver.action.double_click(get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[2]/div")).perform
|
291
|
+
@driver.find_element(:id => "txtEdField").clear()
|
292
|
+
@driver.find_element(:id => "txtEdField").send_keys(sTranslationValue)
|
293
|
+
blnReturn=true
|
294
|
+
end
|
295
|
+
|
296
|
+
# response["translation"]=get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[2]/div").text
|
297
|
+
# response["out of Date"]=get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[4]/div/div/input").selected? #attribute("checked")
|
298
|
+
blnFound=true
|
299
|
+
break
|
300
|
+
end
|
301
|
+
r+=1
|
302
|
+
end
|
303
|
+
idx+=1
|
304
|
+
if blnFound==false
|
305
|
+
get_btn_Translate_CustomReportType_FieldLabel_Next.click unless @driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i
|
306
|
+
sleep(5)
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
310
|
+
return blnReturn
|
311
|
+
# return response
|
312
|
+
end
|
313
|
+
# -----------------------------
|
314
|
+
|
315
|
+
# -----------------------------
|
316
|
+
# get_Translation_CustomReportType_LayoutSection
|
317
|
+
# => Return = Hash {Key= Field Name/Type, Value=Field Value}
|
318
|
+
#
|
319
|
+
def get_Translation_CustomReportType_LayoutSection(sMasterLayoutSection, sCustomReportTypeName)
|
320
|
+
response=Hash.new
|
321
|
+
blnFound=false
|
322
|
+
idx=0
|
323
|
+
|
324
|
+
until (@driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i and idx==@driver.find_element(:id => 'totalPages').text.to_i) or blnFound==true
|
325
|
+
r=0
|
326
|
+
while r < get_Translate_CustomReportType_FieldLabel_rows.length
|
327
|
+
if get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[1]/div").text == sMasterLayoutSection and get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[3]/div").text == sCustomReportTypeName
|
328
|
+
response["translation"]=get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[2]/div").text
|
329
|
+
# response["out of Date"]=get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[4]/div/div/input").selected? #attribute("checked")
|
330
|
+
blnFound=true
|
331
|
+
break
|
332
|
+
end
|
333
|
+
r+=1
|
334
|
+
end
|
335
|
+
idx+=1
|
336
|
+
if blnFound==false
|
337
|
+
get_btn_Translate_CustomReportType_FieldLabel_Next.click unless @driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i
|
338
|
+
sleep(5)
|
339
|
+
end
|
340
|
+
end
|
341
|
+
|
342
|
+
return response
|
343
|
+
end
|
344
|
+
# -----------------------------
|
345
|
+
|
346
|
+
# -----------------------------
|
347
|
+
# set_Translation_CustomReportType_LayoutSection
|
348
|
+
# => Return = true / false
|
349
|
+
#
|
350
|
+
def set_Translation_CustomReportType_LayoutSection(sMasterLayoutSection, sCustomReportTypeName, sTranslationValue)
|
351
|
+
blnReturn=false
|
352
|
+
blnFound=false
|
353
|
+
idx=0
|
354
|
+
|
355
|
+
until (@driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i and idx==@driver.find_element(:id => 'totalPages').text.to_i) or blnFound==true
|
356
|
+
r=0
|
357
|
+
while r < get_Translate_CustomReportType_FieldLabel_rows.length
|
358
|
+
if get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[1]/div").text == sMasterLayoutSection and get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[3]/div").text == sCustomReportTypeName
|
359
|
+
if !(get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[2]/div").text == sTranslationValue)
|
360
|
+
@driver.action.double_click(get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[2]/div")).perform
|
361
|
+
@driver.find_element(:id => "txtEdField").clear()
|
362
|
+
@driver.find_element(:id => "txtEdField").send_keys(sTranslationValue)
|
363
|
+
blnReturn=true
|
364
|
+
end
|
365
|
+
blnFound=true
|
366
|
+
break
|
367
|
+
end
|
368
|
+
r+=1
|
369
|
+
end
|
370
|
+
idx+=1
|
371
|
+
if blnFound==false
|
372
|
+
get_btn_Translate_CustomReportType_FieldLabel_Next.click unless @driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i
|
373
|
+
sleep(5)
|
374
|
+
end
|
375
|
+
end
|
376
|
+
|
377
|
+
return blnReturn
|
378
|
+
end
|
379
|
+
# -----------------------------
|
380
|
+
|
381
|
+
# -----------------------------
|
382
|
+
# get_Translation_RecordType
|
383
|
+
# => Return = Hash {Key= Field Name/Type, Value=Field Value}
|
384
|
+
#
|
385
|
+
def get_Translation_RecordType(sMasterRecordTypeLabel)
|
386
|
+
response=Hash.new
|
387
|
+
blnFound=false
|
388
|
+
idx=0
|
389
|
+
|
390
|
+
until (@driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i and idx==@driver.find_element(:id => 'totalPages').text.to_i) or blnFound==true
|
391
|
+
r=0
|
392
|
+
while r < get_Translate_CustomReportType_FieldLabel_rows.length
|
393
|
+
if get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[1]/div").text == sMasterRecordTypeLabel
|
394
|
+
response["translation"]=get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[2]/div").text
|
395
|
+
# response["out of Date"]=get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[4]/div/div/input").selected? #attribute("checked")
|
396
|
+
blnFound=true
|
397
|
+
break
|
398
|
+
end
|
399
|
+
r+=1
|
400
|
+
end
|
401
|
+
idx+=1
|
402
|
+
if blnFound==false
|
403
|
+
get_btn_Translate_CustomReportType_FieldLabel_Next.click unless @driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i
|
404
|
+
sleep(5)
|
405
|
+
end
|
406
|
+
end
|
407
|
+
|
408
|
+
return response
|
409
|
+
end
|
410
|
+
# -----------------------------
|
411
|
+
|
412
|
+
# -----------------------------
|
413
|
+
# set_Translation_RecordType
|
414
|
+
# => Return = true/ false
|
415
|
+
#
|
416
|
+
def set_Translation_RecordType(sMasterRecordTypeLabel, sTranslationValue)
|
417
|
+
blnReturn=false
|
418
|
+
blnFound=false
|
419
|
+
idx=0
|
420
|
+
|
421
|
+
until (@driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i and idx==@driver.find_element(:id => 'totalPages').text.to_i) or blnFound==true
|
422
|
+
r=0
|
423
|
+
while r < get_Translate_CustomReportType_FieldLabel_rows.length
|
424
|
+
if get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[1]/div").text == sMasterRecordTypeLabel
|
425
|
+
if !(get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[2]/div").text == sTranslationValue)
|
426
|
+
@driver.action.double_click(get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[2]/div")).perform
|
427
|
+
@driver.find_element(:id => "txtEdField").clear()
|
428
|
+
@driver.find_element(:id => "txtEdField").send_keys(sTranslationValue)
|
429
|
+
blnReturn=true
|
430
|
+
end
|
431
|
+
|
432
|
+
# response["translation"]=get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[2]/div").text
|
433
|
+
# response["out of Date"]=get_Translate_CustomReportType_FieldLabel_rows[r].find_element(:xpath => "./table/tbody/tr/td[4]/div/div/input").selected? #attribute("checked")
|
434
|
+
blnFound=true
|
435
|
+
break
|
436
|
+
end
|
437
|
+
r+=1
|
438
|
+
end
|
439
|
+
idx+=1
|
440
|
+
if blnFound==false
|
441
|
+
get_btn_Translate_CustomReportType_FieldLabel_Next.click unless @driver.find_element(:id => 'pageNumField').attribute("value").to_i == @driver.find_element(:id => 'totalPages').text.to_i
|
442
|
+
sleep(5)
|
443
|
+
end
|
444
|
+
end
|
445
|
+
|
446
|
+
return blnReturn
|
447
|
+
end
|
448
|
+
# -----------------------------
|
449
|
+
|
450
|
+
end
|
451
|
+
end
|