ruslan.popov at gmail.com
Sun Oct 17 08:06:29 BST 2010
I've found a solution.
self.dialog = DlgLogin(self)
dialog = self.findChild(QWidget, QString('dialog_login'))
login = dialog.findChild(QWidget, QString('editLogin'))
password = dialog.findChild(QWidget, QString('editPassword'))
ok = dialog.findChild(QWidget, QString('buttonOk'))
I think to move second section of this code to separate thread and run it to
test application. But I need to understand what result is and how to check
this result from my testing thread.
On Sun, Oct 17, 2010 at 12:46 AM, Ruslan Popov <ruslan.popov at gmail.com>wrote:
> It's time to back to this question.
> I want to implement simple action replaying framework to test PyQt apps.
> I have main window and one dialog with two lineedits.
> I can open this dialog but don't understand how to access it from my
> framework to fill lineedits with data and accepts the dialog. Any ideas?
> On Sun, Jan 17, 2010 at 1:28 AM, Andreas Pakulat <apaku at gmx.de> wrote:
>> On 17.01.10 00:08:39, Ruslan Popov wrote:
>> > Can someone share an example of using QTestLib with GUI application?
>> > I've read manuals and some Qt4 books, but they talk about C++ way, not
>> > Python.
>> I don't think QTestlib works so easily in python as it uses a special
>> macro in C++ to generate the boilerplate code to start the unit-test.
>> You could probably lookup what the QTEST_MAIN macro does in Qt's c++
>> code and create similar code in python, but it might just as well be
>> easier to use an existing python unit-testing framework to drive your
>> tests. And the function to trigger signals or send events don't need the
>> QTestlib setup to be used.
>> A visit to a fresh place will bring strange work.
>> PyQt mailing list PyQt at riverbankcomputing.com
> Ruslan Popov
> phone: +7 916 926 1205
> skype: rpopov
phone: +7 916 926 1205
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt