Fix bug 803 - "QWebElementCollection.operator[] is not implemented"
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
This commit is contained in:
parent
a859097f56
commit
eb133c76b8
3 changed files with 35 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
PYSIDE_TEST(bug_448.py)
|
||||
PYSIDE_TEST(bug_694.py)
|
||||
PYSIDE_TEST(bug_803.py)
|
||||
PYSIDE_TEST(webpage_test.py)
|
||||
PYSIDE_TEST(webview_test.py)
|
||||
PYSIDE_TEST(webframe_test.py)
|
||||
|
|
|
|||
18
tests/QtWebKit/bug_803.py
Normal file
18
tests/QtWebKit/bug_803.py
Normal file
|
|
@ -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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue