diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-05-17 19:55:05 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:23 -0300 |
commit | 68157d645e5eb886ec7b3b47979fdf681322e3ac (patch) | |
tree | 0693d6821fd3d6bd37ba5012d3a4cfd7e25acbf7 /tests/QtWebKit/bug_803.py | |
parent | b3f5de99994ae93dd548da3d5fbc74c8a9cd3a9a (diff) |
Fix bug 803 - "QWebElementCollection.operator[] is not implemented"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests/QtWebKit/bug_803.py')
-rw-r--r-- | tests/QtWebKit/bug_803.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/QtWebKit/bug_803.py b/tests/QtWebKit/bug_803.py new file mode 100644 index 000000000..95fd546d4 --- /dev/null +++ b/tests/QtWebKit/bug_803.py @@ -0,0 +1,18 @@ +import unittest +from PySide.QtGui import * +from PySide.QtWebKit import * + +class TestBug803 (unittest.TestCase): + + def testIt(self): + app = QApplication([]) + page = QWebPage() + frame = page.mainFrame() + frame.setHtml("<html><head></head><body><p>1</p><p>2</p></body></html>") + elems = frame.findAllElements("p") + self.assertEqual(len(elems), 2) + self.assertEqual(elems[0].toPlainText(), "1") + self.assertEqual(elems[1].toPlainText(), "2") + +if __name__ == "__main__": + unittest.main() |