Class: Selenium::DevTools::V128::PWA

Inherits:
Object
  • Object
show all
Defined in:
lib/selenium/devtools/v128/pwa.rb

Instance Method Summary collapse

Constructor Details

#initialize(devtools) ⇒ PWA

Returns a new instance of PWA.



26
27
28
# File 'lib/selenium/devtools/v128/pwa.rb', line 26

def initialize(devtools)
  @devtools = devtools
end

Instance Method Details

#change_app_user_settings(manifest_id:, link_capturing: nil, display_mode: nil) ⇒ Object



68
69
70
71
72
73
# File 'lib/selenium/devtools/v128/pwa.rb', line 68

def (manifest_id:, link_capturing: nil, display_mode: nil)
  @devtools.send_cmd('PWA.changeAppUserSettings',
                     manifestId: manifest_id,
                     linkCapturing: link_capturing,
                     displayMode: display_mode)
end

#get_os_app_state(manifest_id:) ⇒ Object



35
36
37
38
# File 'lib/selenium/devtools/v128/pwa.rb', line 35

def get_os_app_state(manifest_id:)
  @devtools.send_cmd('PWA.getOsAppState',
                     manifestId: manifest_id)
end

#install(manifest_id:, install_url_or_bundle_url: nil) ⇒ Object



40
41
42
43
44
# File 'lib/selenium/devtools/v128/pwa.rb', line 40

def install(manifest_id:, install_url_or_bundle_url: nil)
  @devtools.send_cmd('PWA.install',
                     manifestId: manifest_id,
                     installUrlOrBundleUrl: install_url_or_bundle_url)
end

#launch(manifest_id:, url: nil) ⇒ Object



51
52
53
54
55
# File 'lib/selenium/devtools/v128/pwa.rb', line 51

def launch(manifest_id:, url: nil)
  @devtools.send_cmd('PWA.launch',
                     manifestId: manifest_id,
                     url: url)
end

#launch_files_in_app(manifest_id:, files:) ⇒ Object



57
58
59
60
61
# File 'lib/selenium/devtools/v128/pwa.rb', line 57

def launch_files_in_app(manifest_id:, files:)
  @devtools.send_cmd('PWA.launchFilesInApp',
                     manifestId: manifest_id,
                     files: files)
end

#on(event, &block) ⇒ Object



30
31
32
33
# File 'lib/selenium/devtools/v128/pwa.rb', line 30

def on(event, &block)
  event = EVENTS[event] if event.is_a?(Symbol)
  @devtools.callbacks["PWA.#{event}"] << block
end

#open_current_page_in_app(manifest_id:) ⇒ Object



63
64
65
66
# File 'lib/selenium/devtools/v128/pwa.rb', line 63

def open_current_page_in_app(manifest_id:)
  @devtools.send_cmd('PWA.openCurrentPageInApp',
                     manifestId: manifest_id)
end

#uninstall(manifest_id:) ⇒ Object



46
47
48
49
# File 'lib/selenium/devtools/v128/pwa.rb', line 46

def uninstall(manifest_id:)
  @devtools.send_cmd('PWA.uninstall',
                     manifestId: manifest_id)
end