@@ -35,21 +35,20 @@ describe("Camera", () => {
35
35
await takePictureButton . click ( ) ;
36
36
await driver . wait ( 1000 ) ;
37
37
if ( isAndroid ) {
38
- let allow = await driver . findElementByTextIfExists ( "ALLOW " , SearchOptions . exact ) ;
38
+ let allow = await driver . findElementByTextIfExists ( "Allow " , SearchOptions . exact ) ;
39
39
if ( allow !== undefined ) {
40
40
await allow . click ( ) ;
41
- let allowSecond = await driver . findElementByTextIfExists ( "ALLOW " , SearchOptions . exact ) ;
42
- await allowSecond . click ( ) ;
41
+ allow = await driver . findElementByTextIfExists ( "Allow " , SearchOptions . exact ) ;
42
+ await allow . click ( ) ;
43
43
}
44
- let geoTagConfirm = await driver . findElementByTextIfExists ( "Next " , SearchOptions . contains )
45
- if ( geoTagConfirm !== undefined ) {
46
- await geoTagConfirm . click ( ) ;
44
+ const deny = await driver . findElementByTextIfExists ( "Deny " , SearchOptions . exact ) ;
45
+ if ( deny !== undefined ) {
46
+ await deny . click ( ) ;
47
47
}
48
-
49
- let shutterBtn = await driver . findElementByAccessibilityId ( "Shutter" ) ;
50
- await shutterBtn . click ( ) ;
51
- let acceptBtn = await driver . findElementByAccessibilityId ( "Done" ) ;
52
- await acceptBtn . click ( ) ;
48
+ let images = await driver . findElementsByClassName ( driver . locators . image ) ; // Take a picture
49
+ await images [ 5 ] . click ( ) ;
50
+ images = await driver . findElementsByClassName ( driver . locators . image ) ; // Accept it
51
+ await images [ 4 ] . click ( ) ;
53
52
} else {
54
53
let ok = await driver . findElementByTextIfExists ( "OK" , SearchOptions . exact ) ;
55
54
if ( ok !== undefined ) {
0 commit comments