Automated GUI Testing for Qt WebKit Application

I am writing a Qt application that uses QWebView to host the user interface. Similar to the ImageAnalyzer example in the Qt SDK samples.

I would like to test this interface using an automated method. A scripting interface such as Selenium Web-Driver would be preferable.

Any recommendations / examples on how to do this?

Edit:

I am looking for a solution that can identify HTML elements through classes and an identifier so that it is convenient and robust to change.

Tools like Sikuli (which are based on appearance) do not satisfy this criterion. Note. I believe that they are great for quick one-time scripts, they just don't work very well on different platforms / configurations and over time for my purpose.

+4
source share
2 answers

So, I'm not sure if this will satisfy your “Qt application that uses QWebView”, but when you say: “I am looking for a solution, you can identify the HTML elements through the classes and identifier so that it is convenient and reliable to change.” I can think of WatiR (which is a "browser driver"). It is open source, so maybe you can adapt it to manage your application.

There is also a .Net version called WatiN , but then you are limited to Windows.

0
source

For Qt, there is a WebDriver implementation: https://github.com/cisco-open-source/qtwebdriver

Using the Selenium tests and this WebDriver, you can automate QtWebkit, widget, and QML applications.

0
source

Source: https://habr.com/ru/post/1387091/


All Articles