AppiumDriver get Dimensions size Gives Unknown Error Operation Not Supported in Web View












0














I'm wondering if anyone has encountered this issue within the last year, (due to the changes applied to io.Appium client within the last few years.) I'm encountering an issue when I attempt to initialize Dimensions inside a method before performing a general swipe in a mobile browser. According to the StackTrace, the error starts when I intialize my Dimensions object, and the error message I'm getting is



"org.openqa.selenium.WebDriverException: unknown error: operation is unsupported on Android
(Session info: chrome=68.0.3440.91)
(Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds"


I've looked around on discussions on the topic and solution is the one I'm currently using according to Appium Docs when using Web View Context. Is there another factor I'm not considering?



Here is the my method where I initialize my Dimension: size :



@SuppressWarnings("rawtypes")
public void swipeVertical (double startPercentage, double finalPercentage, int duration) {
size = driver.manage().window().getSize();
int width = (int) (size.width/2);
int startPoint = (int) (size.getHeight() * startPercentage);
int endPoint = (int) (size.getHeight() * finalPercentage);
new TouchAction(driver)
.press(PointOption.point(width, startPoint))
.waitAction(WaitOptions.waitOptions(Duration.ofMillis(duration)))
.moveTo(PointOption.point(width, endPoint))
.release()
.perform();
}


And here is the StackTrace:



org.openqa.selenium.WebDriverException: unknown error: operation is unsupported on Android
(Session info: chrome=68.0.3440.91)
(Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 0 milliseconds
Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:24:21.231Z'
System info: host: 'LAPTOP-L1BFDSGL', ip: '192.168.174.2', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_181'
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities {appiumURL: http://127.0.0.1:5000/wd/hub, browserName: Chrome, databaseEnabled: false, desired: {appiumURL: http://127.0.0.1:5000/wd/hub, browserName: Chrome, deviceName: device1, newCommandTimeout: 4000, noReset: false, platformName: Android, systemPort: 8200, udid: 192.168.174.101:5555}, deviceManufacturer: Genymotion, deviceModel: Samsung, deviceName: 192.168.174.101:5555, deviceScreenSize: 1440x2560, deviceUDID: 192.168.174.101:5555, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 4000, noReset: false, platform: LINUX, platformName: Android, platformVersion: 6.0, systemPort: 8200, takesScreenshot: true, udid: 192.168.174.101:5555, warnings: {}, webStorageEnabled: false}
Session ID: 4b662163-cef7-439b-bfd1-998dd6f8e5cc
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:231)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:46)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.getSize(RemoteWebDriver.java:809)
at AppiumDriverSetUp_Lib.PageObject.swipeVertical(PageObject.java:45)
at BaseTest.BaseTest.testActivation(BaseTest.java:62)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
... Removed 20 stack frames


Driver: AppiumDriver



Browser: Chrome



io.appium java Client: 6.1.0



Context: Web View / Default



(Note: I would like to keep the context in its default if applicable.)










share|improve this question





























    0














    I'm wondering if anyone has encountered this issue within the last year, (due to the changes applied to io.Appium client within the last few years.) I'm encountering an issue when I attempt to initialize Dimensions inside a method before performing a general swipe in a mobile browser. According to the StackTrace, the error starts when I intialize my Dimensions object, and the error message I'm getting is



    "org.openqa.selenium.WebDriverException: unknown error: operation is unsupported on Android
    (Session info: chrome=68.0.3440.91)
    (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
    Command duration or timeout: 0 milliseconds"


    I've looked around on discussions on the topic and solution is the one I'm currently using according to Appium Docs when using Web View Context. Is there another factor I'm not considering?



    Here is the my method where I initialize my Dimension: size :



    @SuppressWarnings("rawtypes")
    public void swipeVertical (double startPercentage, double finalPercentage, int duration) {
    size = driver.manage().window().getSize();
    int width = (int) (size.width/2);
    int startPoint = (int) (size.getHeight() * startPercentage);
    int endPoint = (int) (size.getHeight() * finalPercentage);
    new TouchAction(driver)
    .press(PointOption.point(width, startPoint))
    .waitAction(WaitOptions.waitOptions(Duration.ofMillis(duration)))
    .moveTo(PointOption.point(width, endPoint))
    .release()
    .perform();
    }


    And here is the StackTrace:



    org.openqa.selenium.WebDriverException: unknown error: operation is unsupported on Android
    (Session info: chrome=68.0.3440.91)
    (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
    Command duration or timeout: 0 milliseconds
    Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:24:21.231Z'
    System info: host: 'LAPTOP-L1BFDSGL', ip: '192.168.174.2', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_181'
    Driver info: io.appium.java_client.android.AndroidDriver
    Capabilities {appiumURL: http://127.0.0.1:5000/wd/hub, browserName: Chrome, databaseEnabled: false, desired: {appiumURL: http://127.0.0.1:5000/wd/hub, browserName: Chrome, deviceName: device1, newCommandTimeout: 4000, noReset: false, platformName: Android, systemPort: 8200, udid: 192.168.174.101:5555}, deviceManufacturer: Genymotion, deviceModel: Samsung, deviceName: 192.168.174.101:5555, deviceScreenSize: 1440x2560, deviceUDID: 192.168.174.101:5555, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 4000, noReset: false, platform: LINUX, platformName: Android, platformVersion: 6.0, systemPort: 8200, takesScreenshot: true, udid: 192.168.174.101:5555, warnings: {}, webStorageEnabled: false}
    Session ID: 4b662163-cef7-439b-bfd1-998dd6f8e5cc
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
    at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
    at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
    at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
    at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
    at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:231)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
    at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:46)
    at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
    at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
    at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.getSize(RemoteWebDriver.java:809)
    at AppiumDriverSetUp_Lib.PageObject.swipeVertical(PageObject.java:45)
    at BaseTest.BaseTest.testActivation(BaseTest.java:62)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
    ... Removed 20 stack frames


    Driver: AppiumDriver



    Browser: Chrome



    io.appium java Client: 6.1.0



    Context: Web View / Default



    (Note: I would like to keep the context in its default if applicable.)










    share|improve this question



























      0












      0








      0







      I'm wondering if anyone has encountered this issue within the last year, (due to the changes applied to io.Appium client within the last few years.) I'm encountering an issue when I attempt to initialize Dimensions inside a method before performing a general swipe in a mobile browser. According to the StackTrace, the error starts when I intialize my Dimensions object, and the error message I'm getting is



      "org.openqa.selenium.WebDriverException: unknown error: operation is unsupported on Android
      (Session info: chrome=68.0.3440.91)
      (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
      Command duration or timeout: 0 milliseconds"


      I've looked around on discussions on the topic and solution is the one I'm currently using according to Appium Docs when using Web View Context. Is there another factor I'm not considering?



      Here is the my method where I initialize my Dimension: size :



      @SuppressWarnings("rawtypes")
      public void swipeVertical (double startPercentage, double finalPercentage, int duration) {
      size = driver.manage().window().getSize();
      int width = (int) (size.width/2);
      int startPoint = (int) (size.getHeight() * startPercentage);
      int endPoint = (int) (size.getHeight() * finalPercentage);
      new TouchAction(driver)
      .press(PointOption.point(width, startPoint))
      .waitAction(WaitOptions.waitOptions(Duration.ofMillis(duration)))
      .moveTo(PointOption.point(width, endPoint))
      .release()
      .perform();
      }


      And here is the StackTrace:



      org.openqa.selenium.WebDriverException: unknown error: operation is unsupported on Android
      (Session info: chrome=68.0.3440.91)
      (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
      Command duration or timeout: 0 milliseconds
      Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:24:21.231Z'
      System info: host: 'LAPTOP-L1BFDSGL', ip: '192.168.174.2', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_181'
      Driver info: io.appium.java_client.android.AndroidDriver
      Capabilities {appiumURL: http://127.0.0.1:5000/wd/hub, browserName: Chrome, databaseEnabled: false, desired: {appiumURL: http://127.0.0.1:5000/wd/hub, browserName: Chrome, deviceName: device1, newCommandTimeout: 4000, noReset: false, platformName: Android, systemPort: 8200, udid: 192.168.174.101:5555}, deviceManufacturer: Genymotion, deviceModel: Samsung, deviceName: 192.168.174.101:5555, deviceScreenSize: 1440x2560, deviceUDID: 192.168.174.101:5555, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 4000, noReset: false, platform: LINUX, platformName: Android, platformVersion: 6.0, systemPort: 8200, takesScreenshot: true, udid: 192.168.174.101:5555, warnings: {}, webStorageEnabled: false}
      Session ID: 4b662163-cef7-439b-bfd1-998dd6f8e5cc
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
      at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
      at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
      at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:231)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
      at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:46)
      at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
      at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
      at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.getSize(RemoteWebDriver.java:809)
      at AppiumDriverSetUp_Lib.PageObject.swipeVertical(PageObject.java:45)
      at BaseTest.BaseTest.testActivation(BaseTest.java:62)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      ... Removed 20 stack frames


      Driver: AppiumDriver



      Browser: Chrome



      io.appium java Client: 6.1.0



      Context: Web View / Default



      (Note: I would like to keep the context in its default if applicable.)










      share|improve this question















      I'm wondering if anyone has encountered this issue within the last year, (due to the changes applied to io.Appium client within the last few years.) I'm encountering an issue when I attempt to initialize Dimensions inside a method before performing a general swipe in a mobile browser. According to the StackTrace, the error starts when I intialize my Dimensions object, and the error message I'm getting is



      "org.openqa.selenium.WebDriverException: unknown error: operation is unsupported on Android
      (Session info: chrome=68.0.3440.91)
      (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
      Command duration or timeout: 0 milliseconds"


      I've looked around on discussions on the topic and solution is the one I'm currently using according to Appium Docs when using Web View Context. Is there another factor I'm not considering?



      Here is the my method where I initialize my Dimension: size :



      @SuppressWarnings("rawtypes")
      public void swipeVertical (double startPercentage, double finalPercentage, int duration) {
      size = driver.manage().window().getSize();
      int width = (int) (size.width/2);
      int startPoint = (int) (size.getHeight() * startPercentage);
      int endPoint = (int) (size.getHeight() * finalPercentage);
      new TouchAction(driver)
      .press(PointOption.point(width, startPoint))
      .waitAction(WaitOptions.waitOptions(Duration.ofMillis(duration)))
      .moveTo(PointOption.point(width, endPoint))
      .release()
      .perform();
      }


      And here is the StackTrace:



      org.openqa.selenium.WebDriverException: unknown error: operation is unsupported on Android
      (Session info: chrome=68.0.3440.91)
      (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
      Command duration or timeout: 0 milliseconds
      Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:24:21.231Z'
      System info: host: 'LAPTOP-L1BFDSGL', ip: '192.168.174.2', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_181'
      Driver info: io.appium.java_client.android.AndroidDriver
      Capabilities {appiumURL: http://127.0.0.1:5000/wd/hub, browserName: Chrome, databaseEnabled: false, desired: {appiumURL: http://127.0.0.1:5000/wd/hub, browserName: Chrome, deviceName: device1, newCommandTimeout: 4000, noReset: false, platformName: Android, systemPort: 8200, udid: 192.168.174.101:5555}, deviceManufacturer: Genymotion, deviceModel: Samsung, deviceName: 192.168.174.101:5555, deviceScreenSize: 1440x2560, deviceUDID: 192.168.174.101:5555, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 4000, noReset: false, platform: LINUX, platformName: Android, platformVersion: 6.0, systemPort: 8200, takesScreenshot: true, udid: 192.168.174.101:5555, warnings: {}, webStorageEnabled: false}
      Session ID: 4b662163-cef7-439b-bfd1-998dd6f8e5cc
      at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
      at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166)
      at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:40)
      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:80)
      at org.openqa.selenium.remote.http.AbstractHttpResponseCodec.decode(AbstractHttpResponseCodec.java:44)
      at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
      at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:231)
      at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
      at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:46)
      at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
      at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1)
      at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.getSize(RemoteWebDriver.java:809)
      at AppiumDriverSetUp_Lib.PageObject.swipeVertical(PageObject.java:45)
      at BaseTest.BaseTest.testActivation(BaseTest.java:62)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      ... Removed 20 stack frames


      Driver: AppiumDriver



      Browser: Chrome



      io.appium java Client: 6.1.0



      Context: Web View / Default



      (Note: I would like to keep the context in its default if applicable.)







      appium appium-android






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 25 at 17:47









      Wasiq Bhamla

      61349




      61349










      asked Nov 22 at 18:56









      InvisibleExo

      306




      306
























          1 Answer
          1






          active

          oldest

          votes


















          0














          It works fine when driver instance is AndroidDriver <MobileElement> and not AppiumDriver.



          Also you must use AndroidTouchAction instead of TouchAction class.






          share|improve this answer





















          • For this instance, the AppiumDriver instances are AndroidDriver. I also fixed the issue by switching context to Native App, the swipe works, even with TouchAction. However, a new problem occurs when attempting to get Dimension sizes when testing in parallel. I'm getting WebDriverException due to a Bootstrap socket crash. (It happens if both devices are attempting to call getWindowSize() at the same time.
            – InvisibleExo
            Dec 1 at 18:59










          • Solve my socket issue by adding UIAutomator2 as my automationName. In DesiredCapabilites.
            – InvisibleExo
            Dec 2 at 21:22










          • It works for me even with other Automation names like Appiun and Espresso.
            – Wasiq Bhamla
            Dec 3 at 3:06











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53436763%2fappiumdriver-get-dimensions-size-gives-unknown-error-operation-not-supported-in%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          It works fine when driver instance is AndroidDriver <MobileElement> and not AppiumDriver.



          Also you must use AndroidTouchAction instead of TouchAction class.






          share|improve this answer





















          • For this instance, the AppiumDriver instances are AndroidDriver. I also fixed the issue by switching context to Native App, the swipe works, even with TouchAction. However, a new problem occurs when attempting to get Dimension sizes when testing in parallel. I'm getting WebDriverException due to a Bootstrap socket crash. (It happens if both devices are attempting to call getWindowSize() at the same time.
            – InvisibleExo
            Dec 1 at 18:59










          • Solve my socket issue by adding UIAutomator2 as my automationName. In DesiredCapabilites.
            – InvisibleExo
            Dec 2 at 21:22










          • It works for me even with other Automation names like Appiun and Espresso.
            – Wasiq Bhamla
            Dec 3 at 3:06
















          0














          It works fine when driver instance is AndroidDriver <MobileElement> and not AppiumDriver.



          Also you must use AndroidTouchAction instead of TouchAction class.






          share|improve this answer





















          • For this instance, the AppiumDriver instances are AndroidDriver. I also fixed the issue by switching context to Native App, the swipe works, even with TouchAction. However, a new problem occurs when attempting to get Dimension sizes when testing in parallel. I'm getting WebDriverException due to a Bootstrap socket crash. (It happens if both devices are attempting to call getWindowSize() at the same time.
            – InvisibleExo
            Dec 1 at 18:59










          • Solve my socket issue by adding UIAutomator2 as my automationName. In DesiredCapabilites.
            – InvisibleExo
            Dec 2 at 21:22










          • It works for me even with other Automation names like Appiun and Espresso.
            – Wasiq Bhamla
            Dec 3 at 3:06














          0












          0








          0






          It works fine when driver instance is AndroidDriver <MobileElement> and not AppiumDriver.



          Also you must use AndroidTouchAction instead of TouchAction class.






          share|improve this answer












          It works fine when driver instance is AndroidDriver <MobileElement> and not AppiumDriver.



          Also you must use AndroidTouchAction instead of TouchAction class.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 25 at 11:25









          Wasiq Bhamla

          61349




          61349












          • For this instance, the AppiumDriver instances are AndroidDriver. I also fixed the issue by switching context to Native App, the swipe works, even with TouchAction. However, a new problem occurs when attempting to get Dimension sizes when testing in parallel. I'm getting WebDriverException due to a Bootstrap socket crash. (It happens if both devices are attempting to call getWindowSize() at the same time.
            – InvisibleExo
            Dec 1 at 18:59










          • Solve my socket issue by adding UIAutomator2 as my automationName. In DesiredCapabilites.
            – InvisibleExo
            Dec 2 at 21:22










          • It works for me even with other Automation names like Appiun and Espresso.
            – Wasiq Bhamla
            Dec 3 at 3:06


















          • For this instance, the AppiumDriver instances are AndroidDriver. I also fixed the issue by switching context to Native App, the swipe works, even with TouchAction. However, a new problem occurs when attempting to get Dimension sizes when testing in parallel. I'm getting WebDriverException due to a Bootstrap socket crash. (It happens if both devices are attempting to call getWindowSize() at the same time.
            – InvisibleExo
            Dec 1 at 18:59










          • Solve my socket issue by adding UIAutomator2 as my automationName. In DesiredCapabilites.
            – InvisibleExo
            Dec 2 at 21:22










          • It works for me even with other Automation names like Appiun and Espresso.
            – Wasiq Bhamla
            Dec 3 at 3:06
















          For this instance, the AppiumDriver instances are AndroidDriver. I also fixed the issue by switching context to Native App, the swipe works, even with TouchAction. However, a new problem occurs when attempting to get Dimension sizes when testing in parallel. I'm getting WebDriverException due to a Bootstrap socket crash. (It happens if both devices are attempting to call getWindowSize() at the same time.
          – InvisibleExo
          Dec 1 at 18:59




          For this instance, the AppiumDriver instances are AndroidDriver. I also fixed the issue by switching context to Native App, the swipe works, even with TouchAction. However, a new problem occurs when attempting to get Dimension sizes when testing in parallel. I'm getting WebDriverException due to a Bootstrap socket crash. (It happens if both devices are attempting to call getWindowSize() at the same time.
          – InvisibleExo
          Dec 1 at 18:59












          Solve my socket issue by adding UIAutomator2 as my automationName. In DesiredCapabilites.
          – InvisibleExo
          Dec 2 at 21:22




          Solve my socket issue by adding UIAutomator2 as my automationName. In DesiredCapabilites.
          – InvisibleExo
          Dec 2 at 21:22












          It works for me even with other Automation names like Appiun and Espresso.
          – Wasiq Bhamla
          Dec 3 at 3:06




          It works for me even with other Automation names like Appiun and Espresso.
          – Wasiq Bhamla
          Dec 3 at 3:06


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53436763%2fappiumdriver-get-dimensions-size-gives-unknown-error-operation-not-supported-in%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Contact image not getting when fetch all contact list from iPhone by CNContact

          count number of partitions of a set with n elements into k subsets

          A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks