Forum Discussion

Niran's avatar
Niran
Contributor
11 years ago

Automation for Web view based mobile application

Hi Everyone,



                I am using web view based mobile application. I could not map any objects by using TC10. Could anyone suggess how to handle this?



Thanks,

Niranjan.
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    To Niranjan:



    Inclusion of PatchServices.jar module into your Android tested application as per Tanya's reply is required to make it open for TestComplete. When the application is open, you can create tests that operate with application's UI objects, but not their images, thus making your tests way more reliable and powerful.

    The bad news are that even open mobile applications do not provide TestComplete with the information about web page displayed in the WebView control. Currently TestComplete supports testing of mobile web applications that are executed on the desktop via Chrome browser in the mobile client emulation mode (http://support.smartbear.com/viewarticle/57398/).

    For the hybrid mobile applications I see only one possible approach so far:

    -- Use TestComplete to drive your tested mobile application to the point when it requests data to be displayed in the WebView control;

    -- Get the request string been sent to the web server from mobile application (you may ask developers to provide you with this possibility);

    -- Launch Chrome in Mobile Browser emulation mode and navigate to the address obtained on the previous step;

    -- Continue with the web page test on the desktop;

    -- Get the required data from the web page, switch back to the mobile application and feed it with the obtained data.



    Hope, this approach will work for you.

    Also I will appreciate if somebody share their experience with testing hybrid mobile appication(s) using TestComplete.





    To Simon:

    I probably missed something in your question, but image-based testing, along with OCR functionality exists in TestComplete for a long time:

    http://support.smartbear.com/viewarticle/57039/

    http://support.smartbear.com/viewarticle/55011/
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Niranjan,


     


    Did you include the PatchServices.jar library in your application and install the TestComplete Android Agent on your device? You can find more information in the "Preparing for Testing Android Applications" help article on how to do this.


     


    If this doesn't help, please let me know what IDE you used to develop your application.


     

  • Hi Tanya,



         My development team is not using "PatchServices.jar" in our mobile app. They are using eclipse IDE for development.



    Thanks,

    Niranjan.
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Niranjan,


     


    Including the PatchServices.jar module will improve the object recognition in TestComplete. I suggest that you consider the possibility of adding it to your application.


     


    If there is no way to use the module, you will need to work with the image-based recognition. In this case, TestComplete recognizes objects based on the objects’ images. Please refer to this article for more information.


     

  • simon_glet's avatar
    simon_glet
    Regular Contributor
    Hi Tanya,



    Are there any plans to bring Image Based Recognition Testing to desktop applications ?



    Thanks