squish

What Squish module includes "nativeType" low-level function?


I need to import the module that contains nativeType(text) but I can't find the right module. What module includes the function? More generally, is there a list somewhere of squish modules and the functions they include?

The low-level functions are outlined here: https://doc.froglogic.com/squish/latest/rgs-squish.html#rgss-misc, section 6.3.2.22, and the available modules here: https://doc.froglogic.com/squish/latest/rgs-py.html#squish.python.modules

I'm trying to tidy up some Squish tests, replacing use of source(findFile("scripts", "someModule.py")) with proper pythonic "import" statements. Unfortunately, due to the way our code is written, this means changing all imports.


Solution

  • nativeType() resides in the "squish" module.

    Please note that this function (and many others) only "exist" in that module while the test script is running and an AUT is attached (started via startApplication() or attached to via attachToApplication()).

    The background for the latter is that Squish supports various GUI toolkits, and each support for a particular GUI toolkit may bring along functions that only apply to that GUI toolkit. So when switching from a Windows (WPF, WindowsForms, MFC, UI Automation) AUT (Application Under Test) to, say, a web browser (as AUT), the set of functions exposed/known/defined in the "squish" module changes accordingly on the fly.