File: interactive_uitest_elements.cc

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (811 lines) | stat: -rw-r--r-- 27,692 bytes parent folder | download | duplicates (5)
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
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/test/base/ash/interactive/settings/interactive_uitest_elements.h"

#include "base/strings/stringprintf.h"

namespace ash::settings {

WebContentsInteractionTestUtil::DeepQuery InternetPage() {
  return WebContentsInteractionTestUtil::DeepQuery({{
      "os-settings-ui",
      "os-settings-main",
      "main-page-container",
      "settings-internet-page",
  }});
}

WebContentsInteractionTestUtil::DeepQuery InternetPageErrorToast() {
  return InternetPage() + "cr-toast";
}

WebContentsInteractionTestUtil::DeepQuery InternetPageErrorToastMessage() {
  return InternetPage() + "span#errorToastMessage";
}

WebContentsInteractionTestUtil::DeepQuery InternetDetailsSubpage() {
  return InternetPage() + "settings-internet-detail-subpage";
}

WebContentsInteractionTestUtil::DeepQuery NetworkMoreDetailsMenuButton() {
  return InternetPage() + "settings-internet-detail-menu" +
         "cr-icon-button#moreNetworkDetail";
}

WebContentsInteractionTestUtil::DeepQuery InternetSettingsSubpageTitle() {
  return InternetPage() + "os-settings-subpage.iron-selected" +
         "h1#subpageTitle";
}

WebContentsInteractionTestUtil::DeepQuery SettingsSubpageNetworkState() {
  return InternetDetailsSubpage() + "div#networkState";
}

WebContentsInteractionTestUtil::DeepQuery SettingsSubpagePolicyIcon() {
  return InternetDetailsSubpage() + "div#titleDiv" + "cr-policy-indicator";
}

WebContentsInteractionTestUtil::DeepQuery SettingsSubpageConfigureButton() {
  return InternetDetailsSubpage() + "cr-button#configureButton";
}

WebContentsInteractionTestUtil::DeepQuery SettingsSubpageForgetButton() {
  return InternetDetailsSubpage() + "cr-button#forgetButton";
}

WebContentsInteractionTestUtil::DeepQuery
SettingsSubpageConnectDisconnectButton() {
  return InternetDetailsSubpage() + "controlled-button#connectDisconnect" +
         "cr-button";
}

WebContentsInteractionTestUtil::DeepQuery SettingsSubpageBackButton() {
  return InternetDetailsSubpage() + "cr-button#backButton";
}

WebContentsInteractionTestUtil::DeepQuery AddConnectionsExpandButton() {
  return InternetPage() + "cr-expand-button#expandAddConnections";
}

WebContentsInteractionTestUtil::DeepQuery AddWiFiRow() {
  return InternetPage() + "div#add-wifi-label";
}

WebContentsInteractionTestUtil::DeepQuery AddWifiIcon() {
  return InternetPage() + "cr-icon-button.icon-add-wifi";
}

WebContentsInteractionTestUtil::DeepQuery AddBuiltInVpnRow() {
  return InternetPage() + "div#add-vpn-label";
}

WebContentsInteractionTestUtil::DeepQuery InternetConfigDialog() {
  return InternetPage() + "internet-config#configDialog" +
         "network-config#networkConfig";
}

WebContentsInteractionTestUtil::DeepQuery InternetConfigDialogTitle() {
  return InternetPage() + "internet-config#configDialog" + "div#dialogTitle";
}

namespace cellular {

WebContentsInteractionTestUtil::DeepQuery ApnDialog() {
  return InternetPage() + "apn-subpage" + "apn-list" + "apn-detail-dialog";
}

WebContentsInteractionTestUtil::DeepQuery ApnDialogAdvancedSettingsButton() {
  return ApnDialog() + "cr-expand-button";
}

WebContentsInteractionTestUtil::DeepQuery ApnDialogAdvancedSettingsGroup() {
  return ApnDialog() + "iron-collapse";
}

WebContentsInteractionTestUtil::DeepQuery ApnDialogAttachCheckbox() {
  return ApnDialog() + "cr-checkbox#apnAttachTypeCheckbox";
}

WebContentsInteractionTestUtil::DeepQuery ApnDialogDefaultCheckbox() {
  return ApnDialog() + "cr-checkbox#apnDefaultTypeCheckbox";
}

WebContentsInteractionTestUtil::DeepQuery ApnDialogAddActionButton() {
  return ApnDialog() + "cr-button#apnDetailActionBtn";
}

WebContentsInteractionTestUtil::DeepQuery ApnDialogApnInput() {
  return ApnDialog() + "cr-input#apnInput";
}

WebContentsInteractionTestUtil::DeepQuery ApnDialogDefaultApnRequiredInfo() {
  return ApnDialog() + "div#defaultApnRequiredInfo";
}

WebContentsInteractionTestUtil::DeepQuery ApnListFirstItem() {
  return InternetPage() + "apn-subpage" + "apn-list" +
         "apn-list-item:first-of-type";
}

WebContentsInteractionTestUtil::DeepQuery ApnListFirstItemName() {
  return ApnListFirstItem() + "div#apnName";
}

WebContentsInteractionTestUtil::DeepQuery ApnListFirstItemSublabel() {
  return ApnListFirstItem() + "div#subLabel";
}

WebContentsInteractionTestUtil::DeepQuery ApnListNthItem(int n) {
  return InternetPage() + "apn-subpage" + "apn-list" +
         base::StringPrintf("apn-list-item:nth-of-type(%u)", n);
}

WebContentsInteractionTestUtil::DeepQuery ApnListNthItemName(int n) {
  return ApnListNthItem(n) + "div#apnName";
}

WebContentsInteractionTestUtil::DeepQuery ApnListNthItemMenuButton(int n) {
  return ApnListNthItem(n) + "cr-icon-button#actionMenuButton";
}

WebContentsInteractionTestUtil::DeepQuery ApnListNthItemDotsMenu(int n) {
  return ApnListNthItem(n) + "cr-action-menu#dotsMenu";
}

WebContentsInteractionTestUtil::DeepQuery ApnListNthItemDisableButton(int n) {
  return ApnListNthItem(n) + "button#disableButton";
}

WebContentsInteractionTestUtil::DeepQuery ApnListNthItemRemoveButton(int n) {
  return ApnListNthItem(n) + "button#removeButton";
}

WebContentsInteractionTestUtil::DeepQuery ApnListNthItemEnableButton(int n) {
  return ApnListNthItem(n) + "button#enableButton";
}

WebContentsInteractionTestUtil::DeepQuery ApnListItemAutoDetectedDiv() {
  return ApnListFirstItem() + "div#autoDetected";
}

WebContentsInteractionTestUtil::DeepQuery ApnSelectionConfirmButton() {
  return ApnSelectionDialog() + "cr-button#apnSelectionActionBtn";
}

WebContentsInteractionTestUtil::DeepQuery ApnSelectionDialog() {
  return InternetPage() + "apn-subpage" + "apn-list" + "apn-selection-dialog";
}

WebContentsInteractionTestUtil::DeepQuery ApnSelectionFirstItem() {
  return ApnSelectionDialog() + "apn-selection-dialog-list-item:first-of-type";
}

WebContentsInteractionTestUtil::DeepQuery ApnSelectionFirstItemName() {
  return ApnSelectionFirstItem() + "span#friendlyApnName";
}

WebContentsInteractionTestUtil::DeepQuery ApnSubpageActionMenuButton() {
  return InternetPage() + "cr-icon-button#apnActionMenuButton";
}

WebContentsInteractionTestUtil::DeepQuery ApnSubpageCreateApnButton() {
  return InternetPage() + "button#createCustomApnButton";
}

WebContentsInteractionTestUtil::DeepQuery ApnSubpagePolicyIcon() {
  return InternetPage() + "cr-tooltip-icon#apnManagedIcon";
}

WebContentsInteractionTestUtil::DeepQuery ApnSubpageShowKnownApnsButton() {
  return InternetPage() + "button#discoverMoreApnsButton";
}

WebContentsInteractionTestUtil::DeepQuery ApnSubpageZeroStateContent() {
  return InternetPage() + "apn-subpage" + "apn-list" + "div#zeroStateContent";
}

WebContentsInteractionTestUtil::DeepQuery CellularSummaryItem() {
  return InternetPage() + "network-summary" + "network-summary-item#Cellular" +
         "div#networkSummaryItemRow";
}

WebContentsInteractionTestUtil::DeepQuery CellularInhibitedItem() {
  return InternetPage() + "settings-internet-subpage" +
         "cellular-networks-list" + "div#inhibitedSubtext";
}

WebContentsInteractionTestUtil::DeepQuery AddEsimButton() {
  return InternetPage() + "settings-internet-subpage" +
         "cellular-networks-list" + "cr-icon-button#addESimButton";
}

WebContentsInteractionTestUtil::DeepQuery EsimDialog() {
  return InternetPage() + "os-settings-cellular-setup-dialog" +
         "cellular-setup" + "esim-flow-ui";
}

WebContentsInteractionTestUtil::DeepQuery EsimDialogActivationCodeInput() {
  return EsimDialog() + "activation-code-page" + "cr-input#activationCode" +
         "input#input";
}

WebContentsInteractionTestUtil::DeepQuery EsimDialogFirstProfile() {
  return EsimDialog() + "profile-discovery-list-page" +
         "profile-discovery-list-item:first-of-type";
}

WebContentsInteractionTestUtil::DeepQuery EsimDialogFirstProfileLabel() {
  return EsimDialogFirstProfile() + "div#profileTitleLabel";
}

WebContentsInteractionTestUtil::DeepQuery EsimDialogForwardButton() {
  return InternetPage() + "os-settings-cellular-setup-dialog" +
         "cellular-setup" + "button-bar" + "cr-button#forward";
}

WebContentsInteractionTestUtil::DeepQuery EsimDialogInstallingMessage() {
  return EsimDialog() + "setup-loading-page#profileInstallingPage" +
         "base-page" + "div#message";
}

WebContentsInteractionTestUtil::DeepQuery EsimDialogSkipDiscoveryLink() {
  return EsimDialog() + "profile-discovery-consent-page" +
         "localized-link#shouldSkipDiscovery" + "a";
}

WebContentsInteractionTestUtil::DeepQuery EsimDialogTitle() {
  return InternetPage() + "os-settings-cellular-setup-dialog" + "div#header";
}

WebContentsInteractionTestUtil::DeepQuery EsimNetworkList() {
  return InternetPage() + "settings-internet-subpage" +
         "cellular-networks-list" + "network-list#esimNetworkList";
}

WebContentsInteractionTestUtil::DeepQuery PsimNetworkList() {
  return InternetPage() + "settings-internet-subpage" +
         "cellular-networks-list" + "network-list#psimNetworkList";
}

WebContentsInteractionTestUtil::DeepQuery MobileDataToggle() {
  return InternetPage() + "network-summary" + "network-summary-item#Cellular" +
         "cr-toggle#deviceEnabledButton";
}

WebContentsInteractionTestUtil::DeepQuery CellularNetworksList() {
  return InternetPage() + "settings-internet-subpage" +
         "cellular-networks-list";
}

WebContentsInteractionTestUtil::DeepQuery CellularNetworkListItemPolicyIcon() {
  return CellularNetworksList() + "network-list" + "network-list-item" +
         "cr-policy-indicator";
}

WebContentsInteractionTestUtil::DeepQuery CellularSubpagePsimListTitle() {
  return CellularNetworksList() + "div#pSimLabel";
}

WebContentsInteractionTestUtil::DeepQuery
CellularDetailsSubpageApnPolicyIcon() {
  return InternetDetailsSubpage() + "cr-policy-indicator#apnManagedIcon";
}

WebContentsInteractionTestUtil::DeepQuery
CellularDetailsSubpageAutoConnectToggle() {
  return InternetDetailsSubpage() + "settings-toggle-button#autoConnectToggle";
}

WebContentsInteractionTestUtil::DeepQuery
CellularDetailsAllowDataRoamingToggle() {
  return InternetDetailsSubpage() + "cellular-roaming-toggle-button";
}

WebContentsInteractionTestUtil::DeepQuery
CellularDetailsAllowDataRoamingTogglePolicyIcon() {
  return InternetDetailsSubpage() + "cellular-roaming-toggle-button" +
         "network-config-toggle" + "cr-policy-network-indicator-mojo";
}

WebContentsInteractionTestUtil::DeepQuery CellularDetailsNetworkOperator() {
  return InternetDetailsSubpage() + "network-property-list-mojo#infoFields" +
         "div#cellular\\.servingOperator\\.name";
}

WebContentsInteractionTestUtil::DeepQuery CellularDetailsAdvancedSection() {
  return InternetDetailsSubpage() + "cr-expand-button#advancedSectionToggle";
}

WebContentsInteractionTestUtil::DeepQuery CellularDetailsConfigurableSection() {
  return InternetDetailsSubpage() + "cr-expand-button#configurableSections";
}

WebContentsInteractionTestUtil::DeepQuery CellularDetailsProxySection() {
  return InternetDetailsSubpage() + "cr-expand-button#proxySectionToggle";
}

WebContentsInteractionTestUtil::DeepQuery CellularSimLockToggle() {
  return InternetDetailsSubpage() + "network-siminfo#cellularSimInfoAdvanced" +
         "cr-toggle#simLockButton";
}

WebContentsInteractionTestUtil::DeepQuery CellularSimLockTogglePolicyIcon() {
  return InternetDetailsSubpage() + "network-siminfo#cellularSimInfoAdvanced" +
         "cr-policy-indicator#simLockPolicyIcon";
}

WebContentsInteractionTestUtil::DeepQuery CellularSimLockChangePinButton() {
  return InternetDetailsSubpage() + "network-siminfo#cellularSimInfoAdvanced" +
         "cr-button#changePinButton";
}

WebContentsInteractionTestUtil::DeepQuery CellularSimLockDialogs() {
  return InternetDetailsSubpage() + "network-siminfo#cellularSimInfoAdvanced" +
         "sim-lock-dialogs";
}

WebContentsInteractionTestUtil::DeepQuery
CellularSimLockEnterPinDialogPolicySubtitle() {
  return CellularSimLockDialogs() + "div#adminSubtitle";
}

WebContentsInteractionTestUtil::DeepQuery
CellularSimLockEnterPinDialogButton() {
  return CellularSimLockDialogs() + "cr-button#enterPinButton";
}

WebContentsInteractionTestUtil::DeepQuery
CellularSimLockEnterPinDialogSubtext() {
  return CellularSimLockDialogs() + "div#pinEntrySubtext";
}

WebContentsInteractionTestUtil::DeepQuery CellularSimLockEnterPinDialogPin() {
  return CellularSimLockDialogs() + "network-password-input#enterPin" +
         "cr-input#input" + "input#input";
}

WebContentsInteractionTestUtil::DeepQuery
CellularSimLockChangePinDialogButton() {
  return CellularSimLockDialogs() + "cr-button#changePinButton";
}

WebContentsInteractionTestUtil::DeepQuery CellularSimLockChangePinDialogNew() {
  return CellularSimLockDialogs() + "network-password-input#changePinNew1" +
         "cr-input#input" + "input#input";
}

WebContentsInteractionTestUtil::DeepQuery
CellularSimLockChangePinDialogNewConfirm() {
  return CellularSimLockDialogs() + "network-password-input#changePinNew2" +
         "cr-input#input" + "input#input";
}

WebContentsInteractionTestUtil::DeepQuery CellularSimLockChangePinDialogOld() {
  return CellularSimLockDialogs() + "network-password-input#changePinOld" +
         "cr-input#input" + "input#input";
}

WebContentsInteractionTestUtil::DeepQuery
CellularSimLockUnlockPinDialogButton() {
  return CellularSimLockDialogs() + "cr-button#unlockPinButton";
}

WebContentsInteractionTestUtil::DeepQuery CellularSimLockUnlockPinDialogPin() {
  return CellularSimLockDialogs() + "network-password-input#unlockPin" +
         "cr-input#input" + "input#input";
}

WebContentsInteractionTestUtil::DeepQuery
CellularSimLockUnlockPukDialogButton() {
  return CellularSimLockDialogs() + "cr-button#unlockPukButton";
}

WebContentsInteractionTestUtil::DeepQuery CellularSimLockUnlockPukDialogPin() {
  return CellularSimLockDialogs() + "network-password-input#unlockPin1" +
         "cr-input#input" + "input#input";
}

WebContentsInteractionTestUtil::DeepQuery CellularSimLockUnlockPukDialogPuk() {
  return CellularSimLockDialogs() + "network-password-input#unlockPuk" +
         "cr-input#input" + "input#input";
}

WebContentsInteractionTestUtil::DeepQuery
CellularSimLockUnlockPukDialogPinConfirm() {
  return CellularSimLockDialogs() + "network-password-input#unlockPin2" +
         "cr-input#input" + "input#input";
}

WebContentsInteractionTestUtil::DeepQuery CellularSubpageMenuRenameButton() {
  return ash::settings::InternetPage() + "settings-internet-detail-menu" +
         "button#renameBtn";
}

WebContentsInteractionTestUtil::DeepQuery CellularSubpageMenuRenameDialog() {
  return ash::settings::InternetPage() + "esim-rename-dialog#esimRenameDialog";
}

WebContentsInteractionTestUtil::DeepQuery
CellularSubpageMenuRenameDialogDoneButton() {
  return CellularSubpageMenuRenameDialog() + "cr-button#done";
}

WebContentsInteractionTestUtil::DeepQuery
CellularSubpageMenuRenameDialogInputField() {
  return CellularSubpageMenuRenameDialog() + "cr-input#eSimprofileName";
}

WebContentsInteractionTestUtil::DeepQuery CellularSubpageApnRow() {
  return InternetDetailsSubpage() + "cr-link-row#apnSubpageButton";
}

}  // namespace cellular

namespace ethernet {

WebContentsInteractionTestUtil::DeepQuery EthernetSummaryItem() {
  return InternetPage() + "network-summary" + "network-summary-item#Ethernet" +
         "div#networkSummaryItemRow";
}

}  // namespace ethernet

namespace hotspot {

WebContentsInteractionTestUtil::DeepQuery HotspotSummaryItem() {
  return InternetPage() + "network-summary" + "hotspot-summary-item" +
         "div#hotspotSummaryItemRow";
}

WebContentsInteractionTestUtil::DeepQuery HotspotSummarySubtitleLink() {
  return InternetPage() + "network-summary" + "hotspot-summary-item" +
         "localized-link#hotspotDisabledSublabelLink" + "span";
}

WebContentsInteractionTestUtil::DeepQuery HotspotToggle() {
  return InternetPage() + "network-summary" + "hotspot-summary-item" +
         "cr-toggle#enableHotspotToggle";
}

WebContentsInteractionTestUtil::DeepQuery HotspotPolicyIcon() {
  return InternetPage() + "network-summary" + "hotspot-summary-item" +
         "div#hotspotSummaryItemRow" + "cr-policy-indicator#policyIndicator";
}

WebContentsInteractionTestUtil::DeepQuery HotspotConfigureButton() {
  return InternetPage() + "settings-hotspot-subpage" +
         "cr-button#configureButton";
}

WebContentsInteractionTestUtil::DeepQuery HotspotClientCountItem() {
  return InternetPage() + "settings-hotspot-subpage" +
         "div#connectedDeviceCountRow";
}

WebContentsInteractionTestUtil::DeepQuery HotspotConfigDialog() {
  return InternetPage() + "hotspot-config-dialog";
}

WebContentsInteractionTestUtil::DeepQuery HotspotDialogSaveButton() {
  return HotspotConfigDialog() + "cr-button#saveButton";
}

WebContentsInteractionTestUtil::DeepQuery HotspotSSID() {
  return InternetPage() + "settings-hotspot-subpage" + "div#hotspotSSID";
}

WebContentsInteractionTestUtil::DeepQuery HotspotSSIDInput() {
  return HotspotConfigDialog() + "network-config-input#hotspotName" +
         "cr-input" + "input#input";
}

}  // namespace hotspot

namespace wifi {

WebContentsInteractionTestUtil::DeepQuery WifiNetworksList() {
  return InternetPage() + "settings-internet-subpage" +
         "network-list#networkList";
}

WebContentsInteractionTestUtil::DeepQuery WifiNetworksListDiv() {
  return InternetPage() + "settings-internet-subpage" + "div#networkListDiv";
}

WebContentsInteractionTestUtil::DeepQuery WifiSubpageEnableToggle() {
  return InternetPage() + "settings-internet-subpage" +
         "cr-toggle#deviceEnabledButton";
}

WebContentsInteractionTestUtil::DeepQuery WifiSummaryItemToggle() {
  return InternetPage() + "network-summary" + "network-summary-item#WiFi" +
         "cr-toggle#deviceEnabledButton";
}

WebContentsInteractionTestUtil::DeepQuery WifiSummaryItemNetworkState() {
  return WifiSummaryItem() + "div#networkState";
}

WebContentsInteractionTestUtil::DeepQuery WifiSummaryItemSubpageArrow() {
  return WifiSummaryItem() + "cr-icon-button.subpage-arrow";
}

WebContentsInteractionTestUtil::DeepQuery WifiSummaryItem() {
  return InternetPage() + "network-summary" + "network-summary-item#WiFi" +
         "div#networkSummaryItemRow";
}

WebContentsInteractionTestUtil::DeepQuery AddWifiButton() {
  return InternetPage() + "settings-internet-subpage" +
         "cr-icon-button#addWifiButton";
}

WebContentsInteractionTestUtil::DeepQuery ConfigureWifiDialog() {
  return InternetPage() + "internet-config#configDialog" +
         "network-config#networkConfig";
}

WebContentsInteractionTestUtil::DeepQuery ConfigureWifiDialogSsidInput() {
  return ConfigureWifiDialog() + "network-config-input#ssid" + "cr-input" +
         "input#input";
}

WebContentsInteractionTestUtil::DeepQuery ConfigureWifiDialogShareToggle() {
  return ConfigureWifiDialog() + "network-config-toggle#share";
}

WebContentsInteractionTestUtil::DeepQuery ConfigureWifiDialogConnectButton() {
  return InternetPage() + "internet-config#configDialog" +
         "cr-button#connectButton";
}

WebContentsInteractionTestUtil::DeepQuery WifiKnownNetworksSubpageButton() {
  return InternetPage() + "settings-internet-subpage" +
         "cr-link-row#knownNetworksSubpageButton";
}

WebContentsInteractionTestUtil::DeepQuery KnownNetworksSubpage() {
  return InternetPage() + "settings-internet-known-networks-subpage";
}

WebContentsInteractionTestUtil::DeepQuery
KnownNetworksSubpagePasspointSubsciptions() {
  return KnownNetworksSubpage() + "div#passpointSubscriptionList";
}

WebContentsInteractionTestUtil::DeepQuery
KnownNetworksSubpagePasspointSubscriptionItem() {
  return KnownNetworksSubpage() + "cr-link-row#subscriptionItem" + "div#label";
}

WebContentsInteractionTestUtil::DeepQuery
KnownNetworksSubpagePasspointMoreButton() {
  return KnownNetworksSubpage() + "cr-icon-button#subscriptionMoreButton";
}

WebContentsInteractionTestUtil::DeepQuery
KnownNetworksSubpagePasspointDotsMenu() {
  return KnownNetworksSubpage() + "cr-action-menu#subscriptionDotsMenu";
}

WebContentsInteractionTestUtil::DeepQuery
KnownNetworksSubpagePasspointSubscriptionForget() {
  return KnownNetworksSubpage() + "button#subscriptionForget";
}

WebContentsInteractionTestUtil::DeepQuery PasspointSubpageExpirationDate() {
  return InternetPage() + "settings-passpoint-subpage" +
         "div#passpointExpirationDate";
}

WebContentsInteractionTestUtil::DeepQuery PasspointSubpageProviderSource() {
  return InternetPage() + "settings-passpoint-subpage" +
         "div#passpointSourceText";
}

WebContentsInteractionTestUtil::DeepQuery
PasspointSubpageAssociatedNetworksListItem() {
  return InternetPage() + "settings-passpoint-subpage" + "cr-link-row" +
         "div#label";
}

WebContentsInteractionTestUtil::DeepQuery
PasspointSubpageDomainExpansionButton() {
  return InternetPage() + "settings-passpoint-subpage" + "cr-expand-button";
}

WebContentsInteractionTestUtil::DeepQuery PasspointSubpageDomainList() {
  return InternetPage() + "settings-passpoint-subpage" + "iron-collapse";
}

WebContentsInteractionTestUtil::DeepQuery PasspointSubpageDomainListItem() {
  return InternetPage() + "settings-passpoint-subpage" + "div#domainName";
}

WebContentsInteractionTestUtil::DeepQuery PasspointSubpageRemoveButton() {
  return InternetPage() + "settings-passpoint-subpage" +
         "cr-button#removeButton";
}

WebContentsInteractionTestUtil::DeepQuery PasspointSubpageRemoveDialog() {
  return InternetPage() + "settings-passpoint-subpage" +
         "cr-dialog#removalDialog";
}

WebContentsInteractionTestUtil::DeepQuery
PasspointSubpageRemoveDialogConfirmButton() {
  return InternetPage() + "settings-passpoint-subpage" +
         "cr-button#removalConfirmButton";
}

WebContentsInteractionTestUtil::DeepQuery WiFiSubpageNetworkListDiv() {
  return InternetPage() + "settings-internet-subpage" + "#networkListDiv";
}

WebContentsInteractionTestUtil::DeepQuery WiFiSubpageSearchForNetworks() {
  return InternetPage() + "settings-internet-subpage" + "#networkListDiv" +
         "localized-link" + "#container";
}

WebContentsInteractionTestUtil::DeepQuery
WiFiSubpageSearchForNetworksSpinner() {
  return InternetPage() + "os-settings-subpage.iron-selected" +
         "paper-spinner-lite";
}

}  // namespace wifi

namespace vpn {

WebContentsInteractionTestUtil::DeepQuery JoinVpnDialogServiceNameInput() {
  return InternetPage() + "internet-config#configDialog" +
         "network-config#networkConfig" + "network-config-input#vpn-name-input";
}

WebContentsInteractionTestUtil::DeepQuery JoinVpnDialogProviderTypeSelect() {
  return InternetPage() + "internet-config#configDialog" +
         "network-config#networkConfig" +
         "network-config-select#vpn-type-select";
}

WebContentsInteractionTestUtil::DeepQuery JoinVpnDialogProviderTypeOptions() {
  return InternetConfigDialog() + "network-config-select#vpn-type-select" +
         "div#inner" + "select";
}

WebContentsInteractionTestUtil::DeepQuery JoinVpnDialogHostnameInput() {
  return InternetConfigDialog() + "network-config-input#vpn-host-input";
}

WebContentsInteractionTestUtil::DeepQuery JoinVpnDialogOpenVpnUsernameInput() {
  return InternetConfigDialog() + "network-config-input#openvpn-username-input";
}

WebContentsInteractionTestUtil::DeepQuery JoinVpnDialogOpenVpnPasswordInput() {
  return InternetConfigDialog() +
         "network-password-input#openvpn-password-input";
}

WebContentsInteractionTestUtil::DeepQuery JoinVpnDialogOpenVpnOtpInput() {
  return InternetConfigDialog() + "network-config-input#openvpn-otp-input";
}

WebContentsInteractionTestUtil::DeepQuery JoinVpnDialogSaveCredentialsToggle() {
  return InternetConfigDialog() +
         "network-config-toggle#vpn-save-credentials-toggle";
}

WebContentsInteractionTestUtil::DeepQuery JoinVpnDialogConnectButton() {
  return InternetPage() + "internet-config#configDialog" +
         "cr-button#connectButton";
}

WebContentsInteractionTestUtil::DeepQuery VpnSummaryItem() {
  return InternetPage() + "network-summary" + "network-summary-item#VPN" +
         "div#networkSummaryItemRow";
}

WebContentsInteractionTestUtil::DeepQuery VpnNetworksList() {
  return InternetPage() + "settings-internet-subpage" + "network-list";
}

WebContentsInteractionTestUtil::DeepQuery VpnNetworksListFirstItem() {
  return VpnNetworksList() + "network-list-item:first-of-type";
}

WebContentsInteractionTestUtil::DeepQuery VpnSubpageProviderType() {
  return InternetDetailsSubpage() + "network-property-list-mojo#infoFields" +
         "div#vpn\\.type";
}

WebContentsInteractionTestUtil::DeepQuery VpnSubpageHostnameInput() {
  return InternetDetailsSubpage() + "network-property-list-mojo#infoFields" +
         "cr-input#vpn\\.host" + "input";
}

WebContentsInteractionTestUtil::DeepQuery VpnSubpageUsernameInput() {
  return InternetDetailsSubpage() + "network-property-list-mojo#infoFields" +
         "cr-input#vpn\\.openVpn\\.username" + "input";
}

}  // namespace vpn

namespace bluetooth {

WebContentsInteractionTestUtil::DeepQuery BluetoothPage() {
  return WebContentsInteractionTestUtil::DeepQuery({{
      "os-settings-ui",
      "os-settings-main",
      "main-page-container",
      "os-settings-bluetooth-page",
  }});
}

WebContentsInteractionTestUtil::DeepQuery BluetoothPairNewDeviceButton() {
  return BluetoothPage() + "cr-button#pairNewDevice";
}

WebContentsInteractionTestUtil::DeepQuery BluetoothPairingDialog() {
  return BluetoothPage() + "os-settings-bluetooth-pairing-dialog";
}

WebContentsInteractionTestUtil::DeepQuery BluetoothDeviceList() {
  return BluetoothPage() + "os-settings-bluetooth-devices-subpage" +
         "os-settings-paired-bluetooth-list";
}

WebContentsInteractionTestUtil::DeepQuery BluetoothSubpageToggle() {
  return BluetoothPage() + "os-settings-bluetooth-devices-subpage" +
         "cr-toggle#enableBluetoothToggle";
}

WebContentsInteractionTestUtil::DeepQuery BluetoothDeviceDetailSubpage() {
  return BluetoothPage() + "os-settings-bluetooth-device-detail-subpage";
}

WebContentsInteractionTestUtil::DeepQuery BluetoothChangeDeviceNameButton() {
  return BluetoothDeviceDetailSubpage() + "cr-button#changeNameBtn";
}

WebContentsInteractionTestUtil::DeepQuery BluetoothBatteryPercentage() {
  return BluetoothDeviceDetailSubpage() +
         "bluetooth-device-battery-info#batteryInfo" +
         "bluetooth-battery-icon-percentage#defaultBattery" +
         "span#batteryPercentage";
}

WebContentsInteractionTestUtil::DeepQuery BluetoothForgetDeviceButton() {
  return BluetoothDeviceDetailSubpage() + "cr-button#forgetBtn";
}

WebContentsInteractionTestUtil::DeepQuery BluetoothDeviceName() {
  return BluetoothDeviceDetailSubpage() + "div#bluetoothDeviceNameLabel";
}

WebContentsInteractionTestUtil::DeepQuery BluetoothRenameDialog() {
  return BluetoothDeviceDetailSubpage() +
         "os-settings-bluetooth-change-device-name-dialog";
}

WebContentsInteractionTestUtil::DeepQuery BluetoothRenameDialogInputField() {
  return BluetoothRenameDialog() + "cr-input#changeNameInput";
}

WebContentsInteractionTestUtil::DeepQuery BluetoothRenameDialogDoneButton() {
  return BluetoothRenameDialog() + "cr-button#done";
}

WebContentsInteractionTestUtil::DeepQuery BluetoothForgetDialog() {
  return BluetoothDeviceDetailSubpage() +
         "os-settings-bluetooth-forget-device-dialog";
}

WebContentsInteractionTestUtil::DeepQuery BluetoothForgetDialogDoneButton() {
  return BluetoothForgetDialog() + "cr-button#forget";
}

}  // namespace bluetooth

}  // namespace ash::settings