Regarding Mobile Web View Testing and Emulation in Katalon Studio

I am writing to inquire about the mobile web testing capabilities within Katalon Studio. I am currently evaluating the best approach for testing the mobile-responsive view of our web application and had a few specific questions.

  1. Converting to Mobile View in a Web Browser: Is it possible to simulate a mobile device viewport within a desktop web browser (like Chrome or Firefox) directly from a Katalon Studio WebUI test? For example, to test how a website renders on an iPhone 13 or a Google Pixel 7 without using a real device.

  2. Steps for Configuration: If the above is possible, could you please point me toward the documentation or outline the necessary steps to configure this? I am particularly interested in how to set specific device metrics (e.g., screen resolution, user-agent).

  3. Mobile Browser Emulator Testing: Furthermore, I would like to confirm if Katalon Studio allows users to open a browser within an Android Emulator (via Android Virtual Device) or an iOS Simulator (on macOS) to perform testing. This would be for a more accurate environment than just viewport simulation.

Could you please advise on the recommended method for achieving these testing scenarios within the Katalon ecosystem?

1 Like
  • Manually setting the browser window size to match mobile device resolutions using WebUI.setViewPortSize(width, height).

  • Overriding the user-agent string to mimic a mobile device with desired capabilities or WebDriver options.

  • To set device specifications for simulation:

    • Window Size:
      Use WebUI.setViewPortSize(width, height) in your test scripts to set the browser to a mobile-like resolution.

    • User-Agent:
      You can define the user-agent string for the browser to mimic a mobile device. This can be configured via browser-specific WebDriver options or desired capabilities.

    For Chrome, you would add desired capabilities, for example:

    groovy
    

    importcom.kms.katalon.core.webui.driver.DriverFactoryimportorg.openqa.selenium.chrome.ChromeOptions ChromeOptions options =new ChromeOptions() options.addArguments("user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 13_0 like Mac OS X)...") DriverFactory.changeWebDriver(new ChromeDriver(options))

1 Like

would this work on testcloud as well?

Could you pls help resolving
http://forum.katalon.com/t/how-to-allow-the-notifications-on-browsers-for-mobile/180859