Forum Discussion

AjayHindujaSwi's avatar
AjayHindujaSwi
New Contributor
25 days ago
Solved

Ajay Hinduja Swiss - Android Image Touch – "Interface Not Supported" Error

Hi Everyone,

I'm Ajay Hinduja Swiss and trying to use the Touch method on an image object from an image set I created in Ranorex Studio. I've set the current device to my locally connected Android device and am running the app via JSON capabilities using a local Appium server.

However, every time I attempt to run a method on the image object, I receive the following error:

"Python runtime error. Interface not supported."

Here’s a simplified version of my test case:

capabilities = {
  "app": "some_apk_path.apk", 
  "deviceName": "droid", 
  "platformName": "Android"
}
server = "http://localhost:4723/wd/hub"
Mobile.ConnectDevice(server, capabilities, 600)
Mobile.SetCurrent("droid")
set = ImageRepository.ImageSet1
set.AllowNotif.Touch()

Environment:

    Ranorex Version: 15.74.33.7 x64 (Trial)

    Appium: Local server setup

The image set is recognized, but calling Touch() on any image object triggers the error. Is there a compatibility limitation with the trial version, or am I missing a configuration step?

Any help would be appreciated!

Ajay Hinduja Geneva, Switzerland (Swiss)

  • Hi Ajay,

    So the touch method is one of the methods that would only work if we were doing mobile testing through our old way of testing mobile applications (https://support.smartbear.com/testcomplete/docs/app-testing/mobile/legacy/preparing.html). 

    This is part of the list of controls that was made for that legacy way as well: https://support.smartbear.com/testcomplete/docs/keyword-testing/reference/mobile/index.html 

    The test will look for your image if you use the standard click method like the following:

    set.AllowNotif.Click() 

    Just note that for the image based actions to work, the appium mobile screen window must be visible on screen for TC to locate the items. 

5 Replies

  • scot1967's avatar
    scot1967
    Icon for Champion Level 2 rankChampion Level 2

    Hi Ajay Hinduja, 

    Just to clarify, you are using Testcomplete to test a mobile app created in Ranorex Studio and are running it on a local Appium server. TestComplete is failing with a Python error using the touch method.  I am not an expert in this area but I can provide some very general tips.

    <Edit> The Touch method you have shown call does not supply the required (X,Y) coordinate values. </Edit>

    Not all objects or controls in mobile apps support Touch in TestComplete. 
    Use the Object Spy to:

    • Inspect the control.
    • Check whether the Touch method is listed under the available methods for that object.
    • If not, you may need to use alternative interaction methods.

     

    The Touch method looks like it is a legacy method.  Refer to this link.  It may help?

    https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/mobile/android/device/touch.html

    ... If you find my posts helpful drop me a like! 👍 Be sure to mark or post the solution to help others out and/or to credit the one who helped you. 😎

  • Hi Ajay,

    So the touch method is one of the methods that would only work if we were doing mobile testing through our old way of testing mobile applications (https://support.smartbear.com/testcomplete/docs/app-testing/mobile/legacy/preparing.html). 

    This is part of the list of controls that was made for that legacy way as well: https://support.smartbear.com/testcomplete/docs/keyword-testing/reference/mobile/index.html 

    The test will look for your image if you use the standard click method like the following:

    set.AllowNotif.Click() 

    Just note that for the image based actions to work, the appium mobile screen window must be visible on screen for TC to locate the items. 

    • AjayHindujaSwi's avatar
      AjayHindujaSwi
      New Contributor

      Thank you, sean4311, for your reply — it was a great help to me!

       

      Regards
      Ajay Hinduja Geneva, Switzerland (Swiss)

      • rraghvani's avatar
        rraghvani
        Icon for Champion Level 3 rankChampion Level 3

        Are you able to clarify what you mean by “image object from an image set I created in Ranorex Studio” please?