Class: Capybara::Playwright::Driver
- Inherits:
-
Driver::Base
- Object
- Driver::Base
- Capybara::Playwright::Driver
show all
- Extended by:
- Forwardable
- Includes:
- DriverExtension
- Defined in:
- lib/capybara/playwright/driver.rb
Instance Method Summary
collapse
#on_save_raw_screenshot_before_reset, #on_save_screenrecord, #with_playwright_page
Constructor Details
#initialize(app, **options) ⇒ Driver
Returns a new instance of Driver.
9
10
11
12
|
# File 'lib/capybara/playwright/driver.rb', line 9
def initialize(app, **options)
@browser_runner = BrowserRunner.new(options)
@page_options = PageOptions.new(options)
end
|
Instance Method Details
#invalid_element_errors ⇒ Object
#needs_server? ⇒ Boolean
15
|
# File 'lib/capybara/playwright/driver.rb', line 15
def needs_server?; true; end
|
#no_such_window_error ⇒ Object
#reset! ⇒ Object
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# File 'lib/capybara/playwright/driver.rb', line 49
def reset!
if callback_on_save_screenshot?
raw_screenshot = @browser&.raw_screenshot
if raw_screenshot
callback_on_save_screenshot(raw_screenshot)
end
end
video_path = @browser&.video_path
@browser&.clear_browser_contexts
if video_path
callback_on_save_screenrecord(video_path)
end
@browser = nil
end
|
#wait? ⇒ Boolean
14
|
# File 'lib/capybara/playwright/driver.rb', line 14
def wait?; true; end
|