14
14
# KIND, either express or implied. See the License for the
15
15
# specific language governing permissions and limitations
16
16
# under the License.
17
+ import pytest
17
18
18
19
from selenium .webdriver .common .print_page_options import PrintOptions
19
20
22
23
PDF_MAGIC_NUMBER = "JVBER"
23
24
24
25
26
+ @pytest .mark .xfail_safari (reason = "no endpoint for print in safari" )
25
27
def test_pdf_with_2_pages (driver , pages ):
26
28
print_options = PrintOptions ()
27
29
print_options .page_ranges = ["1-2" ]
@@ -33,13 +35,15 @@ def test_pdf_with_2_pages(driver, pages):
33
35
assert base64code [START_INDEX :END_INDEX ] == PDF_MAGIC_NUMBER
34
36
35
37
38
+ @pytest .mark .xfail_safari (reason = "no endpoint for print in safari" )
36
39
def test_pdf_with_all_pages (driver , pages ):
37
40
pages .load ("printPage.html" )
38
41
base64code = driver .print_page ()
39
42
40
43
assert base64code [START_INDEX :END_INDEX ] == PDF_MAGIC_NUMBER
41
44
42
45
46
+ @pytest .mark .xfail_safari (reason = "no endpoint for print in safari" )
43
47
def test_valid_params (driver , pages ):
44
48
print_options = PrintOptions ()
45
49
@@ -53,6 +57,7 @@ def test_valid_params(driver, pages):
53
57
assert base64code [START_INDEX :END_INDEX ] == PDF_MAGIC_NUMBER
54
58
55
59
60
+ @pytest .mark .xfail_safari (reason = "no endpoint for print in safari" )
56
61
def test_session_id_is_not_preserved_after_page_is_printed (driver , pages ):
57
62
print_options = PrintOptions ()
58
63
print_options .margin_bottom = print_options .margin_top = print_options .margin_left = print_options .margin_right = 0
0 commit comments