|
21 | 21 |
|
22 | 22 | module Selenium
|
23 | 23 | module WebDriver
|
24 |
| - describe "PrintOptions" do |
25 |
| - let(:magic_number) { 'JVBER' } |
26 |
| - |
27 |
| - before do |
28 |
| - options = Selenium::WebDriver::Chrome::Options.new |
29 |
| - options.add_argument('--headless') |
30 |
| - |
31 |
| - @driver = Selenium::WebDriver.for :chrome, options: options |
32 |
| - @driver.navigate.to url_for('printPage.html') |
33 |
| - end |
34 |
| - |
35 |
| - it 'should return base64 for print command' do |
36 |
| - expect(@driver.print_page).to include(magic_number) |
37 |
| - end |
38 |
| - |
39 |
| - it 'should print with orientation' do |
40 |
| - expect(@driver.print_page(orientation: 'landscape')).to include(magic_number) |
41 |
| - end |
42 |
| - |
43 |
| - it 'should print with valid params' do |
44 |
| - expect(@driver.print_page(orientation: 'landscape', page_ranges: ['1-2'], page: {width: 30})).to include(magic_number) |
| 24 | + module Firefox |
| 25 | + describe Driver, exclusive: {driver: :firefox} do |
| 26 | + describe '#print_options' do |
| 27 | + let(:magic_number) { 'JVBER' } |
| 28 | + |
| 29 | + before { driver.navigate.to url_for('printPage.html') } |
| 30 | + |
| 31 | + it 'should return base64 for print command' do |
| 32 | + expect(driver.print_page).to include(magic_number) |
| 33 | + end |
| 34 | + |
| 35 | + it 'should print with orientation' do |
| 36 | + expect(driver.print_page(orientation: 'landscape')).to include(magic_number) |
| 37 | + end |
| 38 | + |
| 39 | + it 'should print with valid params' do |
| 40 | + expect(driver.print_page(orientation: 'landscape', |
| 41 | + page_ranges: ['1-2'], |
| 42 | + page: {width: 30})).to include(magic_number) |
| 43 | + end |
| 44 | + end |
45 | 45 | end
|
46 |
| - end |
47 |
| - end |
48 |
| -end |
| 46 | + end # Firefox |
| 47 | + end # WebDriver |
| 48 | +end # Selenium |
0 commit comments