diff --git a/src/main/java/io/appium/java_client/PullsFiles.java b/src/main/java/io/appium/java_client/PullsFiles.java index 4b60a5748..c6d4e0898 100644 --- a/src/main/java/io/appium/java_client/PullsFiles.java +++ b/src/main/java/io/appium/java_client/PullsFiles.java @@ -17,6 +17,7 @@ package io.appium.java_client; import com.google.common.collect.ImmutableMap; +import org.openqa.selenium.UnsupportedCommandException; import java.nio.charset.StandardCharsets; import java.util.AbstractMap; @@ -49,7 +50,7 @@ default byte[] pullFile(String remotePath) { ImmutableMap.of("remotePath", remotePath) ) ); - } catch (UnsupportedOperationException e) { + } catch (UnsupportedCommandException e) { // TODO: Remove the fallback base64String = checkNotNull( CommandExecutionHelper.execute(markExtensionAbsence(extName), @@ -81,7 +82,7 @@ default byte[] pullFolder(String remotePath) { ImmutableMap.of("remotePath", remotePath) ) ); - } catch (UnsupportedOperationException e) { + } catch (UnsupportedCommandException e) { // TODO: Remove the fallback base64String = checkNotNull( CommandExecutionHelper.execute(markExtensionAbsence(extName),