We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c8e97d commit 4efd4dfCopy full SHA for 4efd4df
examples/test_chinese_pdf.py
@@ -0,0 +1,22 @@
1
+# -*- coding: utf-8 -*-
2
+from seleniumbase import BaseCase
3
+
4
5
+class ChinesePdfTestClass(BaseCase):
6
7
+ def test_chinese_pdf(self):
8
9
+ pdf = ('https://github.com/seleniumbase/SeleniumBase/'
10
+ 'files/3895614/unittest.pdf')
11
12
+ # Get and print PDF text
13
+ pdf_text = self.get_pdf_text(pdf, page=2)
14
+ print("\n" + pdf_text)
15
16
+ # Assert PDF contains the expected text on Page 2
17
+ self.assert_pdf_text(pdf, "个测试类", page=2)
18
19
+ # Assert PDF contains the expected text on any of the pages
20
+ self.assert_pdf_text(pdf, "运行单元测试")
21
+ self.assert_pdf_text(pdf, "等待测试结束后显示所有结果")
22
+ self.assert_pdf_text(pdf, "测试的执行跟方法的顺序没有关系")
0 commit comments