1

I do automation and currently automating an application made with QT (C++). I use Squish to do this using Python scripting language.

Can someone explain me exactly how a Python variable can be assigned a C++ Object?

0

1 Answer 1

1

Do you need to refer C++ built-in types (int, long, char, wchar_t, etc.) and arrays in Python code? If so you need to use ctypes Python package. Here is an example of calling C++ dll function from Python. If you need to send Window message (like WM_CLICK) take a look at ctypes.Structure class. There are some examples of C structures declared in Python code.

EDIT: Currently I know 2 open source projects about QT GUI automation.

Also it's possible to build and run QT app with accessibility features for Windows UIA and Linux AT-SPI.

Sign up to request clarification or add additional context in comments.

4 Comments

I'm mainly talking about objects here. An Application that is written in C++ langauge using QT is being automated using a language like Python or Javascript. How is that actually happening is my question.
Do you mean UI testing automation? If using free tools probably you need pyQT and PySide packages or Windows UI Automation API (which is hard to use from Python, and it's complicated to learn - and not cross-platform). If this is a subject, let's talk about UI object representation (namely wrapper) that can contain some info about UI control and interact with it somehow. Such info format and interaction technologies highly depends on a platform: OS, GUI app framework (QT, WPF, MFC, wxWidgets or smth like that), having custom controls etc.
I don't know how Squish interacts with QT application process. Let's ask Squish developers about that. :) I still don't understand which concrete technical problem you are trying to solve.
Updated the answer with more up-to-date info.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.