File tree Expand file tree Collapse file tree 4 files changed +35
-12
lines changed
rb/lib/selenium/webdriver Expand file tree Collapse file tree 4 files changed +35
-12
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ class Driver < WebDriver::Driver
34
34
include DriverExtensions ::HasDevTools
35
35
include DriverExtensions ::HasAuthentication
36
36
include DriverExtensions ::HasLogEvents
37
+ include DriverExtensions ::PrintsPage
37
38
38
39
def browser
39
40
:chrome
@@ -47,12 +48,6 @@ def execute_cdp(cmd, **params)
47
48
@bridge . send_command ( cmd : cmd , params : params )
48
49
end
49
50
50
- def print_page ( **options )
51
- options [ :page_ranges ] &&= Array ( options [ :page_ranges ] )
52
-
53
- @bridge . print_page ( options )
54
- end
55
-
56
51
private
57
52
58
53
def debugger_address
Original file line number Diff line number Diff line change 60
60
require 'selenium/webdriver/common/driver_extensions/has_network_connection'
61
61
require 'selenium/webdriver/common/driver_extensions/has_permissions'
62
62
require 'selenium/webdriver/common/driver_extensions/has_debugger'
63
+ require 'selenium/webdriver/common/driver_extensions/prints_page'
63
64
require 'selenium/webdriver/common/driver_extensions/uploads_files'
64
65
require 'selenium/webdriver/common/driver_extensions/has_addons'
65
66
require 'selenium/webdriver/common/driver_extensions/has_devtools'
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed to the Software Freedom Conservancy (SFC) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The SFC licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+
20
+ module Selenium
21
+ module WebDriver
22
+ module DriverExtensions
23
+ module PrintsPage
24
+ def print_page ( **options )
25
+ options [ :page_ranges ] &&= Array ( options [ :page_ranges ] )
26
+
27
+ @bridge . print_page ( options )
28
+ end
29
+ end # PrintsPage
30
+ end # DriverExtensions
31
+ end # WebDriver
32
+ end # Selenium
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ module Firefox
29
29
class Driver < WebDriver ::Driver
30
30
include DriverExtensions ::HasAddons
31
31
include DriverExtensions ::HasWebStorage
32
+ include DriverExtensions ::PrintsPage
32
33
33
34
def browser
34
35
:firefox
@@ -37,12 +38,6 @@ def browser
37
38
def bridge_class
38
39
Bridge
39
40
end
40
-
41
- def print_page ( **options )
42
- options [ :page_ranges ] &&= Array ( options [ :page_ranges ] )
43
-
44
- @bridge . print_page ( options )
45
- end
46
41
end # Driver
47
42
end # Firefox
48
43
end # WebDriver
You can’t perform that action at this time.
0 commit comments