11import { AppiumDriver , createDriver , SearchOptions } from "nativescript-dev-appium" ;
22import { isSauceLab , runType } from "nativescript-dev-appium/lib/parser" ;
33import { expect } from "chai" ;
4+ import { findAndroidImages } from "./helper" ;
45const fs = require ( 'fs' ) ;
56const addContext = require ( 'mochawesome/addContext' ) ;
67const rimraf = require ( 'rimraf' ) ;
@@ -57,6 +58,11 @@ describe("Imagepicker", async function () {
5758 const confirmButton = await driver . findElementByText ( confirmButtonText ) ;
5859 await confirmButton . click ( ) ;
5960
61+ // TODO remove when SauceLabs fix images location
62+ if ( isAndroid ) {
63+ await findAndroidImages ( driver ) ;
64+ }
65+
6066 if ( ! isAndroid ) {
6167 const cameraRollFolder = await driver . findElementByAccessibilityId ( imagesFolderNameIos ) ;
6268 await cameraRollFolder . click ( ) ;
@@ -82,6 +88,11 @@ describe("Imagepicker", async function () {
8288 const pickMultipleButton = await driver . findElementByText ( pickMultipleButtonText , SearchOptions . contains ) ;
8389 await pickMultipleButton . click ( ) ;
8490
91+ // TODO remove when SauceLabs fix images location
92+ if ( isAndroid ) {
93+ await findAndroidImages ( driver ) ;
94+ }
95+
8596 if ( ! isAndroid ) {
8697 const cameraRollFolder = await driver . findElementByText ( imagesFolderNameIos ) ;
8798 await cameraRollFolder . click ( ) ;
0 commit comments