-
Notifications
You must be signed in to change notification settings - Fork 254
Expand file tree
/
Copy pathKeywords.html
More file actions
3517 lines (3354 loc) · 178 KB
/
Keywords.html
File metadata and controls
3517 lines (3354 loc) · 178 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
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<script
src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha256-3edrmyuQ0w65f8gfBsqowzjJe2iM6n0nKciPUp8y+7E="
crossorigin="anonymous"
></script>
<script>
function filter() {
var filter_string = $("#filter").val().toLowerCase();
$(".kwtable .kwname").each(function () {
if ($(this).text().toLowerCase().indexOf(filter_string) !== -1) {
$(this).parent().show();
} else {
$(this).parent().hide();
}
});
}
$(document).ready(function () {
$("#filter").on("input", function () {
filter();
});
$("#filter").keyup(function () {
filter();
});
});
</script>
<style>
body {
font-family: "Open Sans", sans-serif;
}
.container {
margin: 2em;
}
#search {
width: 20em;
}
.header {
display: flex;
align-items: bottom;
}
.header h1 {
margin-top: 0px;
}
.header search {
align-self: flex-end;
margin-bottom: 0px;
}
.file-header: {
margin-bottom: 10em;
}
.file-header h2 {
padding-bottom: 4px;
margin-bottom: 4px;
border-bottom: 1px solid #127a9a;
color: firebrick;
}
.right {
margin-left: auto;
}
.search {
align-self: center;
}
.search {
border: 0px;
}
.search input {
border: 1px solid gray;
padding: 4px;
}
.footer {
margin: 30px;
/* background: black; */
font-size: 80%;
/* color: gray; */
padding: 4px;
}
.section {
margin-bottom: 2em;
margin-left: 2em;
}
pre {
max-width: 60em;
border: 1px solid lightgrey;
padding: 10px 0px 10px 10px;
}
.pageobject-file-description {
margin-left: 2em;
}
.description {
margin-top: 0em;
margin-bottom: 0.5em;
padding-left: 0em;
padding-top: 0em;
padding-bottom: 0em;
max-width: 60em;
}
.kwtable {
box-shadow: 3px 3px 5px #d4d4d4;
border-collapse: collapse;
border: 1px solid gray;
text-align: left;
width: 100%;
}
.kwtable th {
font-weight: normal;
background: #109ad7;
color: #f0f0f0;
padding: 4px;
border: 1px solid gray;
}
.kwrow td {
padding: 4px;
border: 1px solid gray;
vertical-align: top;
}
.kwtable tr:hover {
background-color: #f9f9f9;
}
.kwtable .kwargs {
width: 20%;
}
.kwtable .kwname {
font-weight: bold;
width: 25%;
/* min-width: 15em; */
/* max-width: 20%; */
}
.library-documentation {
margin-bottom: 2em;
margin-left: 2em;
}
.pageobject-header {
margin-top: 2em;
margin-left: 0px;
padding: 0px;
border-spacing: 0px;
}
.pageobject-header td {
border: 0px;
padding-right: 1.5em;
}
.pageobject-header .data {
padding-right: 10px;
font-size: 1.5em;
font-weight: bold;
}
.pageobject-header .labels {
font-size: 0.75em;
font-weight: normal;
color: gray;
}
</style>
</head>
<body>
<div class="container">
<!-- this is the header for the documentation as a whole -->
<div class="header">
<h1 class="title">CumulusCI Robot Framework Keywords</h1>
<div class="filter right">
filter: <input id="filter" type="filter" />
</div>
</div>
<div class="file" id="file-cumulusci.robotframework.CumulusCI">
<div class="file-header">
<h2 title="cumulusci.robotframework.CumulusCI">CumulusCI</h2>
<div class="file-path">cumulusci.robotframework.CumulusCI</div>
</div>
<div class="section" pageobject="">
<div class="description" title="Description">
<p>Library for accessing CumulusCI for the local git project</p>
<p>
This library allows Robot Framework tests to access
credentials to a Salesforce org created by CumulusCI,
including Scratch Orgs. It also exposes the core logic of
CumulusCI including interactions with the Salesforce API's and
project specific configuration including custom and customized
tasks and flows.
</p>
<p>
Initialization requires a single argument, the org name for
the target CumulusCI org. If running your tests via cci's
robot task (recommended), you can initialize the library in
your tests taking advantage of the variable set by the robot
task:
</p>
<pre>
<code>*** Settings ***</code>
Library cumulusci.robotframework.CumulusCI ${ORG}
</pre>
</div>
<table class="kwtable" title="Table of keywords">
<tbody>
<tr>
<th>Keyword</th>
<th>Arguments</th>
<th>Documentation</th>
</tr>
<tr class="kwrow" id="CumulusCI.Debug">
<td class="kwname">Debug</td>
<td class="kwargs"></td>
<td class="kwdoc">
<p>
Pauses execution and enters the Python debugger.
</p>
</td>
</tr>
<tr class="kwrow" id="CumulusCI.Get-Community-Info">
<td class="kwname">Get Community Info</td>
<td class="kwargs">
<i>community_name</i>, <i>key=None</i>,
<i>force_refresh=False</i>
</td>
<td class="kwdoc">
<p>
This keyword uses the Salesforce API to get
information about a community.
</p>
<p>
This keyword requires the exact community name as
its first argumment.
</p>
<ul>
<li>
If no key is given, all of the information
returned by the API will be returned by this
keyword in the form of a dictionary
</li>
<li>
If a key is given, only the value for that key
will be returned.
</li>
</ul>
<p>
Some of the supported keys include name, siteUrl,
and loginUrl. For a comprehensive list see the
<a
href="https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_responses_community.htm"
>API documentation</a
>, or call this keyword without the key argument
and examine the results.
</p>
<p>
An API call will be made the first time this
keyword is used, and the return values will be
cached. Subsequent calls will not call the API
unless the requested community name is not in the
cached results, or unless the force_refresh
parameter is set to True.
</p>
</td>
</tr>
<tr class="kwrow" id="CumulusCI.Get-Namespace-Prefix">
<td class="kwname">Get Namespace Prefix</td>
<td class="kwargs">
<i>package=None</i>
</td>
<td class="kwdoc">
<p>
Returns the namespace prefix (including __) for
the specified package name. (Defaults to
project__package__name_managed from the current
project config.)
</p>
<p>
Returns an empty string if the package is not
installed as a managed package.
</p>
</td>
</tr>
<tr class="kwrow" id="CumulusCI.Get-Org-Info">
<td class="kwname">Get Org Info</td>
<td class="kwargs"></td>
<td class="kwdoc">
<p>
Returns a dictionary of the org information for
the current target Salesforce org
</p>
</td>
</tr>
<tr class="kwrow" id="CumulusCI.Login-Url">
<td class="kwname">Login Url</td>
<td class="kwargs">
<i>org=None</i>,
<i>**userfields</i>
</td>
<td class="kwdoc">
<p>
Returns the login url which will automatically log
into the target Salesforce org. By default, the
org_name passed to the library constructor is used
but this can be overridden with the org option to
log into a different org.
</p>
<p>
If userfields are provided, the username and
access token for the given user will be used. If
not provided, the access token for the org's
default user will be used.
</p>
<p>
The userfields argument is largely useful for
scratch orgs, but can also work with connected
persistent orgs if you've connected the org with
the given username.
</p>
<p>Example:</p>
<pre>
${login url}= Login URL alias=dadvisor
</pre
>
</td>
</tr>
<tr class="kwrow" id="CumulusCI.Run-Task">
<td class="kwname">Run Task</td>
<td class="kwargs">
<i>task_name</i>,
<i>**options</i>
</td>
<td class="kwdoc">
<p>
Runs a named CumulusCI task for the current
project with optional support for overriding task
options via kwargs.
</p>
<p>
Note: task_name can be prefixed with the name of
another project, just the same as when running the
task from the command line. The other project
needs to have been defined in the 'sources'
section of cumulusci.yml.
</p>
<p>The task output will appear in the robot log.</p>
<p>Examples:</p>
<table border="1">
<tr>
<th>Keyword</th>
<th>task_name</th>
<th>task_options</th>
<th>comment</th>
</tr>
<tr>
<td>Run Task</td>
<td>deploy</td>
<td></td>
<td>Run deploy with standard options</td>
</tr>
<tr>
<td>Run Task</td>
<td>deploy</td>
<td>path=path/to/some/metadata</td>
<td>Run deploy with custom path</td>
</tr>
<tr>
<td>Run task</td>
<td>npsp:deploy_rd2_config</td>
<td></td>
<td>
Run the deploy_rd2_config task from the
NPSP project
</td>
</tr>
</table>
</td>
</tr>
<tr class="kwrow" id="CumulusCI.Run-Task-Class">
<td class="kwname">Run Task Class</td>
<td class="kwargs">
<i>class_path</i>,
<i>**options</i>
</td>
<td class="kwdoc">
<p>
Runs a CumulusCI task class with task options via
kwargs.
</p>
<p>
Use this keyword to run logic from CumulusCI tasks
which have not been configured in the project's
cumulusci.yml file. This is most useful in cases
where a test needs to use task logic for logic
unique to the test and thus not worth making into
a named task for the project
</p>
<p>The task output will appear in the robot log.</p>
<p>Examples:</p>
<table border="1">
<tr>
<th>Keyword</th>
<th>task_class</th>
<th>task_options</th>
</tr>
<tr>
<td>Run Task Class</td>
<td>cumulusci.task.utils.DownloadZip</td>
<td>
url=http://test.com/test.zip dir=test_zip
</td>
</tr>
</table>
</td>
</tr>
<tr class="kwrow" id="CumulusCI.Set-Login-Url">
<td class="kwname">Set Login Url</td>
<td class="kwargs"></td>
<td class="kwdoc">
<p>
Sets the LOGIN_URL variable in the suite scope
which will automatically log into the target
Salesforce org.
</p>
<p>Typically, this is run during Suite Setup</p>
</td>
</tr>
<tr class="kwrow" id="CumulusCI.Set-Project-Config">
<td class="kwname">Set Project Config</td>
<td class="kwargs">
<i>project_config</i>
</td>
<td class="kwdoc"></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="file" id="file-cumulusci.robotframework.PageObjects">
<div class="file-header">
<h2 title="cumulusci.robotframework.PageObjects">PageObjects</h2>
<div class="file-path">cumulusci.robotframework.PageObjects</div>
</div>
<div class="section" pageobject="">
<div class="description" title="Description">
<p>Keyword library for importing and using page objects</p>
<p>
When importing, you can include one or more paths to python
files that define page objects. For example, if you have a set
of classes in robot/HEDA/resources/PageObjects.py, you can
import this library into a test case like this:
</p>
<pre>
Library cumulusci.robotframework.PageObjects
... robot/HEDA/resources/PageObjects.py
</pre
>
<p>
Page object classes need to use the @pageobject decorator from
cumulusci.robotframework.pageobjects. The decorator takes two
parameters: page_type and object_name. Both are arbitrary
strings, but together should uniquely identify a collection of
keywords for a page or objects on a page.
</p>
<p>
Examples of page_type are Listing, Home, Detail, etc. Object
types can be actual object types (Contact), custom object
(Custom_object__c) or a logical name for a type of page (eg:
AppointmentManager).
</p>
<p>Example:</p>
<pre>
from cumulusci.robotframework.pageobjects import BasePage
from cumulusci.robotframework.pageobjects import pageobject
...
@pageobject(page_type="Detail", object_name="Custom__c")
class CustomDetailPage(BasePage):
...
</pre
>
</div>
<table class="kwtable" title="Table of keywords">
<tbody>
<tr>
<th>Keyword</th>
<th>Arguments</th>
<th>Documentation</th>
</tr>
<tr class="kwrow" id="PageObjects.Current-Page-Should-Be">
<td class="kwname">Current Page Should Be</td>
<td class="kwargs">
<i>page_type</i>, <i>object_name</i>,
<i>**kwargs</i>
</td>
<td class="kwdoc">
<p>
Verifies that the page appears to be the requested
page
</p>
<p>
If the page matches the given page object or
contains the given page object, the keyword will
pass.a
</p>
<p>
When this keyword is called, it will try to get
the page object for the given page_tyope and
object_name, and call the method
`_is_current_page`.
</p>
<p>
Custom page objects may define this function in
whatever manner is necessary to determine that the
current page is or contains the given page object.
The only requirement is that this function raise
an exception if it determines the current page
either doesn't represent the page object or
doesn't contain the page object.
</p>
<p>
The default implementation of the function uses
the page URL and compares it to a pattern based
off of the page_type and object_name.
</p>
</td>
</tr>
<tr class="kwrow" id="PageObjects.Get-Page-Object">
<td class="kwname">Get Page Object</td>
<td class="kwargs">
<i>page_type</i>,
<i>object_name</i>
</td>
<td class="kwdoc">
<p>Return an instance of a page object</p>
<p>
This is useful if you want to call a single page
object method from some other keyword without
having to go to another page or load the page
object into a page.
</p>
<p>
This works a lot like robot's built-in "get
library instance" keyword, but you can specify the
page object by page type and object name rather
than the library name, and it will autoload the
appropriate library (assuming its module has been
imported).
</p>
</td>
</tr>
<tr class="kwrow" id="PageObjects.Go-To-Page">
<td class="kwname">Go To Page</td>
<td class="kwargs">
<i>page_type</i>, <i>object_name</i>, <i>*args</i>,
<i>**kwargs</i>
</td>
<td class="kwdoc">
<p>Go to the page of the given page object.</p>
<p>
The URL will be computed from the page_type and
object_name associated with the object, plus
possibly additional arguments.
</p>
<p>
Different pages support different additional
arguments. For example, a Listing page supports
the keyword argument `filter_name`, and a Detail
page can be given an object id, or parameters for
looking up the object id.
</p>
<p>
If this keyword is able to navigate to a page, the
keyword `load page object` will automatically be
called to load the keywords for the page.
</p>
<p>
Custom page objects may define the function
`_go_to_page`, which will be passed in all of the
keyword arguments from this keyword. This allows
each page object to define its own URL mapping
using whatever algorithm it chooses. The only
requirement of the function is that it should
compute an appropriate url and then call
`self.selenium.go_to` with the URL.
</p>
<p>
It is also recommended that the keyword wait until
it knows that the page has finished rendering
before returning (eg: by calling
`self.salesforce.wait_until_loading_is_complete()`)
</p>
</td>
</tr>
<tr class="kwrow" id="PageObjects.Load-Page-Object">
<td class="kwname">Load Page Object</td>
<td class="kwargs">
<i>page_type</i>,
<i>object_name=None</i>
</td>
<td class="kwdoc">
<p>
Load the keywords for the page object identified
by the type and object name
</p>
<p>
The page type / object name pair must have been
registered using the
cumulusci.robotframework.pageobject decorator.
</p>
</td>
</tr>
<tr class="kwrow" id="PageObjects.Log-Page-Object-Keywords">
<td class="kwname">Log Page Object Keywords</td>
<td class="kwargs"></td>
<td class="kwdoc">
<p>
Logs page objects and their keywords for all page
objects which have been imported into the current
suite.
</p>
</td>
</tr>
<tr class="kwrow" id="PageObjects.Wait-For-Modal">
<td class="kwname">Wait For Modal</td>
<td class="kwargs">
<i>page_type</i>, <i>object_name</i>,
<i>expected_heading=None</i>,
<i>**kwargs</i>
</td>
<td class="kwdoc">
<p>Wait for the given page object modal to appear.</p>
<p>
This will wait for modal to appear. If an expected
heading is provided, it will also validate that
the modal has the expected heading.
</p>
<p>Example:</p>
<pre>
Wait for modal to appear New Contact expected_heading=New Contact
</pre
>
</td>
</tr>
<tr class="kwrow" id="PageObjects.Wait-For-Page-Object">
<td class="kwname">Wait For Page Object</td>
<td class="kwargs">
<i>page_type</i>, <i>object_name</i>,
<i>**kwargs</i>
</td>
<td class="kwdoc">
<p>
Wait for an element represented by a page object
to appear on the page.
</p>
<p>
The associated page object will be loaded after
the element appears.
</p>
<p>
page_type represents the page type (Home, Details,
etc)) and object_name represents the name of an
object (Contact, Organization, etc)
</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="file" id="file-cumulusci.robotframework.Performance">
<div class="file-header">
<h2 title="cumulusci.robotframework.Performance">Performance</h2>
<div class="file-path">cumulusci.robotframework.Performance</div>
</div>
<div class="section" pageobject="">
<div class="description" title="Description">
<p>Keywords for performance testing.</p>
<p>
For more information on how to use these keywords, see the
"Performance Testing" section of the CumulusCI documentation.
</p>
</div>
<table class="kwtable" title="Table of keywords">
<tbody>
<tr>
<th>Keyword</th>
<th>Arguments</th>
<th>Documentation</th>
</tr>
<tr
class="kwrow"
id="Performance.Elapsed-Time-For-Last-Record"
>
<td class="kwname">Elapsed Time For Last Record</td>
<td class="kwargs">
<i>obj_name</i>, <i>start_field</i>, <i>end_field</i>,
<i>order_by</i>,
<i>**kwargs</i>
</td>
<td class="kwdoc">
<p>
For records representing jobs or processes,
compare the record's start-time to its end-time to
see how long a process took.
</p>
<p>
Arguments: obj_name: SObject to look for last
record start_field: Name of the datetime field
that represents the process start end_field: Name
of the datetime field that represents the process
end order_by: Field name to order by. Should be a
datetime field, and usually is just the same as
end_field. where: Optional Where-clause to use for
filtering Other keywords are used for filtering as
in the Salesforce Query keywordf
</p>
<p>
The last matching record queried and summarized.
</p>
<p>Example:</p>
<pre>
${time_in_seconds} = Elapsed Time For Last Record
... obj_name=AsyncApexJob
... where=ApexClass.Name='BlahBlah'
... start_field=CreatedDate
... end_field=CompletedDate
... order_by=CompletedDate
</pre
>
</td>
</tr>
<tr class="kwrow" id="Performance.Set-Test-Elapsed-Time">
<td class="kwname">Set Test Elapsed Time</td>
<td class="kwargs">
<i>elapsedtime</i>
</td>
<td class="kwdoc">
<p>
This keyword captures a computed rather than
measured elapsed time for performance tests.
</p>
<p>
For example, if you were performance testing a
Salesforce batch process, you might want to store
the Salesforce-measured elapsed time of the batch
process instead of the time measured in the CCI
client process.
</p>
<p>
The keyword takes a single argument which is
either a number of seconds or a Robot time string
(<a
href="https://robotframework.org/robotframework/latest/libraries/DateTime.html#Time%20formats"
>https://robotframework.org/robotframework/latest/libraries/DateTime.html#Time%20formats</a
>).
</p>
<p>
Using this keyword will automatically add the tag
cci_metric_elapsed_time to the test case and
${cci_metric_elapsed_time} to the test's
variables. cci_metric_elapsed_time is not included
in Robot's html statistical roll-ups.
</p>
<p>Example:</p>
<pre>
Set Test Elapsed Time 11655.9
</pre
>
<p>
Performance test times are output in the CCI logs
and are captured in MetaCI instead of the "total
elapsed time" measured by Robot Framework. The
Robot "test message" is also updated.
</p>
</td>
</tr>
<tr class="kwrow" id="Performance.Set-Test-Metric">
<td class="kwname">Set Test Metric</td>
<td class="kwargs">
<i>metric: str</i>,
<i>value=None</i>
</td>
<td class="kwdoc">
<p>
This keyword captures any metric for performance
monitoring.
</p>
<p>
For example: number of queries, rows processed,
CPU usage, etc.
</p>
<p>
The keyword takes a metric name, which can be any
string, and a value, which can be any number.
</p>
<p>
Using this keyword will automatically add the tag
cci_metric to the test case and
${cci_metric_<metric_name>} to the test's
variables. These permit downstream processing in
tools like CCI and MetaCI.
</p>
<p>
cci_metric is not included in Robot's html
statistical roll-ups.
</p>
<p>Example:</p>
<pre>
Set Test Metric Max_CPU_Percent 30
</pre
>
<p>
Performance test metrics are output in the CCI
logs, log.html and output.xml. MetaCI captures
them but does not currently have a user interface
for displaying them.
</p>
</td>
</tr>
<tr class="kwrow" id="Performance.Start-Performance-Timer">
<td class="kwname">Start Performance Timer</td>
<td class="kwargs"></td>
<td class="kwdoc">
<p>
Start an elapsed time stopwatch for performance
tests.
</p>
<p>
See the docummentation for
<b>*Stop Performance Timer*</b> for more
information.
</p>
<p>Example:</p>
<pre>
Start Performance Timer
Do Something
Stop Performance Timer
</pre
>
</td>
</tr>
<tr class="kwrow" id="Performance.Stop-Performance-Timer">
<td class="kwname">Stop Performance Timer</td>
<td class="kwargs"></td>
<td class="kwdoc">
<p>
Record the results of a stopwatch. For perf
testing.
</p>
<p>
This keyword uses Set Test Elapsed Time internally
and therefore outputs in all of the ways described
there.
</p>
<p>Example:</p>
<pre>
Start Performance Timer
Do Something
Stop Performance Timer
</pre
>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="file" id="file-cumulusci.robotframework.Salesforce">
<div class="file-header">
<h2 title="cumulusci.robotframework.Salesforce">Salesforce</h2>
<div class="file-path">cumulusci.robotframework.Salesforce</div>
</div>
<div class="section" pageobject="">
<div class="description" title="Description">
<p>
A keyword library for working with Salesforce Lightning pages
</p>
<p>
While you can import this directly into any suite, the
recommended way to include this in a test suite is to import
the <code>Salesforce.robot</code> resource file.
</p>
</div>
<table class="kwtable" title="Table of keywords">
<tbody>
<tr>
<th>Keyword</th>
<th>Arguments</th>
<th>Documentation</th>
</tr>
<tr class="kwrow" id="Salesforce.Breakpoint">
<td class="kwname">Breakpoint</td>
<td class="kwargs"></td>
<td class="kwdoc">
<p>Serves as a breakpoint for the robot debugger</p>
<p>
Note: this keyword is a no-op unless the
<code>robot_debug</code> option for the task has
been set to <code>true</code>. Unless the option
has been set, this keyword will have no effect on
a running test.
</p>
</td>
</tr>
<tr class="kwrow" id="Salesforce.Click-Header-Field-Link">
<td class="kwname">Click Header Field Link</td>
<td class="kwargs">
<i>label</i>
</td>
<td class="kwdoc">
<p>Clicks a link in record header.</p>
</td>
</tr>
<tr class="kwrow" id="Salesforce.Click-Modal-Button">
<td class="kwname">Click Modal Button</td>
<td class="kwargs">
<i>title</i>
</td>
<td class="kwdoc">
<p>Clicks a button in a Lightning modal.</p>
</td>
</tr>
<tr class="kwrow" id="Salesforce.Click-Object-Button">
<td class="kwname">Click Object Button</td>
<td class="kwargs">
<i>title</i>
</td>
<td class="kwdoc">
<p>Clicks a button in an object's actions.</p>
</td>
</tr>
<tr class="kwrow" id="Salesforce.Click-Related-Item-Link">
<td class="kwname">Click Related Item Link</td>
<td class="kwargs">
<i>heading</i>,
<i>title</i>
</td>
<td class="kwdoc">
<p>
Clicks a link in the related list with the
specified heading.
</p>
<p>
This keyword will automatically call
<b>Wait until loading is complete</b>.
</p>
</td>
</tr>
<tr
class="kwrow"
id="Salesforce.Click-Related-Item-Popup-Link"
>
<td class="kwname">Click Related Item Popup Link</td>
<td class="kwargs">
<i>heading</i>, <i>title</i>,
<i>link</i>
</td>
<td class="kwdoc">
<p>
Clicks a link in the popup menu for a related list
item.
</p>
<p>
heading specifies the name of the list, title
specifies the name of the item, and link specifies
the name of the link
</p>
</td>
</tr>