@@ -72,10 +72,14 @@ private AndroidElement findElementByText(String text) {
72
72
new NoSuchElementException (String .format ("There is no element with the text '%s'" , text )));
73
73
}
74
74
75
- private void clickNext () {
75
+ private void clickNext () {
76
76
driver .findElementById ("com.android.settings:id/next_button" ).click ();
77
77
}
78
78
79
+ private void clickFingerPrintNext () {
80
+ driver .findElementById ("com.android.settings:id/fingerprint_next_button" ).click ();
81
+ }
82
+
79
83
private void clickOKInPopup () {
80
84
driver .findElementById ("android:id/button1" ).click ();
81
85
}
@@ -88,13 +92,14 @@ private void enterPasswordAndContinue() {
88
92
private void clickOnSecurity () {
89
93
driver .findElement (AndroidUIAutomator ("new UiScrollable(new UiSelector()"
90
94
+ ".scrollable(true)).scrollIntoView("
91
- + "new UiSelector().text(\" Security\" ));" )).click ();
95
+ + "new UiSelector().text(\" Security & location \" ));" )).click ();
92
96
}
93
97
94
98
/**
95
99
* enable system security which is required for finger print activation.
96
100
*/
97
- @ Before public void before () {
101
+ @ Before
102
+ public void before () {
98
103
initDriver ();
99
104
clickOnSecurity ();
100
105
findElementByText ("Screen lock" ).click ();
@@ -107,13 +112,14 @@ private void clickOnSecurity() {
107
112
/**
108
113
* add a new finger print to security.
109
114
*/
110
- @ Test public void fingerPrintTest () {
115
+ @ Test
116
+ public void fingerPrintTest () {
111
117
findElementByText ("Fingerprint" ).click ();
112
- clickNext ();
118
+ clickFingerPrintNext ();
113
119
enterPasswordAndContinue ();
114
- clickNext ( );
115
-
116
- driver .fingerPrint (2 );
120
+ driver . fingerPrint ( 1234 );
121
+ driver . fingerPrint ( 1234 );
122
+ driver .fingerPrint (1234 );
117
123
try {
118
124
clickNext ();
119
125
} catch (Exception e ) {
@@ -124,7 +130,8 @@ private void clickOnSecurity() {
124
130
/**
125
131
* disabling pin lock mode.
126
132
*/
127
- @ After public void after () {
133
+ @ After
134
+ public void after () {
128
135
driver .quit ();
129
136
130
137
initDriver ();
0 commit comments