diff --git a/.bashrc b/.bashrc index ffc06c00..cf45b921 100644 --- a/.bashrc +++ b/.bashrc @@ -8,6 +8,9 @@ export HOMEBREW_PREFIX=/home/linuxbrew/.linuxbrew # == Nodenv eval "$(nodenv init -)" +# == Yarn +export PATH="$(yarn global bin):$PATH" + # == Rbenv eval "$(rbenv init -)" diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 6c697143..67d85eb2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -49,6 +49,8 @@ jobs: && sudo gzip -d /usr/bin/overmind.gz \ && sudo chmod u+x /usr/bin/overmind \ && sudo chown $(whoami) /usr/bin/overmind + - name: Install Playwright + run: yarn global add playwright && playwright install - name: Set up environment run: bin/setup - name: Check formatting diff --git a/Dockerfile b/Dockerfile index bea16fac..afad89b2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,15 +17,15 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ && sudo apt-get install -yq --no-install-recommends libpq-dev libffi-dev libvips \ && sudo truncate -s 0 /var/log/*log -# Install Google Chrome -RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - \ - && sudo touch /etc/apt/sources.list.d/google-chrome.list \ - && sudo echo deb \[arch=amd64\] http://dl.google.com/linux/chrome/deb/ stable main | sudo tee /etc/apt/sources.list.d/google-chrome.list \ - && sudo apt-get -y update -q \ - && sudo apt-get install -yq --no-install-recommends google-chrome-stable \ - && sudo truncate -s 0 /var/log/*log +# # Install Google Chrome +# RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ +# --mount=type=cache,target=/var/lib/apt,sharing=locked \ +# curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - \ +# && sudo touch /etc/apt/sources.list.d/google-chrome.list \ +# && sudo echo deb \[arch=amd64\] http://dl.google.com/linux/chrome/deb/ stable main | sudo tee /etc/apt/sources.list.d/google-chrome.list \ +# && sudo apt-get -y update -q \ +# && sudo apt-get install -yq --no-install-recommends google-chrome-stable \ +# && sudo truncate -s 0 /var/log/*log # Configure shell RUN mv "$HOME/.bashrc" "$HOME/.bashrc.orig" @@ -43,6 +43,9 @@ RUN rbenv install # Install NodeJS and Yarn RUN nodenv install && npm install -g yarn +# Install Playwright +RUN yarn global add playwright && playwright install --with-deps + # Install Python and Poetry RUN pyenv install && pip3 install poetry diff --git a/Gemfile b/Gemfile index 5d3e25d3..66356049 100644 --- a/Gemfile +++ b/Gemfile @@ -190,9 +190,6 @@ gem "rack-cors", "~> 2.0" # Load events from Google Calendar gem "google_calendar", "~> 0.6.4" -# Print resume as PDF with Selenium -gem "selenium-webdriver", "~> 4.11" - # Detect what OS we are running on gem "os", "~> 1.1" @@ -202,9 +199,12 @@ gem "telegram-bot-ruby", "~> 1.0", require: 'telegram/bot' # Hash passwords with bcrypt gem "bcrypt", "~> 3.1" -# Compare times +# Compare times with time_difference gem "time_difference", "~> 0.5.0" +# Control the browser with Playwright +gem "playwright-ruby-client", "~> 1.40", require: 'playwright' + group :development, :test do # Auto-detect and warn about N+1 queries gem "bullet" @@ -258,4 +258,5 @@ end group :test do # Use system testing [https://guides.rubyonrails.org/testing.html#system-testing] gem "capybara" + gem "capybara-playwright-driver" end diff --git a/Gemfile.lock b/Gemfile.lock index ea40b963..2495617d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -99,7 +99,7 @@ GEM minitest (>= 5.1) mutex_m tzinfo (~> 2.0) - addressable (2.8.5) + addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) after_party (1.11.2) annotate (3.2.0) @@ -150,6 +150,9 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) + capybara-playwright-driver (0.5.0) + capybara + playwright-ruby-client (>= 1.16.0) coderay (1.1.3) concurrent-ruby (1.2.2) connection_pool (2.4.1) @@ -357,6 +360,9 @@ GEM activerecord (>= 5.2) activesupport (>= 5.2) phonelib (0.6.58) + playwright-ruby-client (1.40.0) + concurrent-ruby (>= 1.1.6) + mime-types (>= 3.0) premailer (1.21.0) addressable css_parser (>= 1.12.0) @@ -447,7 +453,7 @@ GEM sorbet-runtime (>= 0.5.9204) rdoc (6.6.1) psych (>= 4.0.0) - regexp_parser (2.8.2) + regexp_parser (2.8.3) reline (0.4.1) io-console (~> 0.5) rerun (0.14.0) @@ -510,11 +516,6 @@ GEM ffi (~> 1.12) ruby2_keywords (0.0.5) ruby_http_client (3.5.5) - rubyzip (2.3.2) - selenium-webdriver (4.15.0) - rexml (~> 3.2, >= 3.2.5) - rubyzip (>= 1.2.2, < 3.0) - websocket (~> 1.0) sendgrid-ruby (6.7.0) ruby_http_client (~> 3.4) sentry-rails (5.14.0) @@ -599,7 +600,6 @@ GEM bindex (>= 0.4.0) railties (>= 6.0.0) webrick (1.8.1) - websocket (1.2.10) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) @@ -636,6 +636,7 @@ DEPENDENCIES bullet can_has_validations (~> 1.8) capybara + capybara-playwright-driver concurrent-ruby (~> 1.1) date_validator (~> 0.12.0) debug @@ -673,6 +674,7 @@ DEPENDENCIES pg (~> 1.5) pg_search (~> 2.3) phonelib (~> 0.6.55) + playwright-ruby-client (~> 1.40) premailer-rails (~> 1.12) pry pry-doc @@ -700,7 +702,6 @@ DEPENDENCIES rubocop-sorbet ruby-lsp ruby-vips (~> 2.1) - selenium-webdriver (~> 4.11) sendgrid-ruby (~> 6.6) sentry-rails (~> 5.9) silencer (~> 2.0) diff --git a/Procfile.test b/Procfile.test index 988099b2..546dac5d 100644 --- a/Procfile.test +++ b/Procfile.test @@ -1,4 +1,4 @@ docker: docker compose up --abort-on-container-exit postgres-test postgres: sleep 0.5 && docker compose logs -f --no-log-prefix postgres-test vite-ssr: bin/vite ssr -rails: bin/rails db:prepare && bin/rails test:all || exit -1 +rails: sleep 1 && bin/rails db:prepare && bin/rails test:all || exit -1 diff --git a/app/components/ResumeLayout.tsx b/app/components/ResumeLayout.tsx index eaab3da8..4781a080 100644 --- a/app/components/ResumeLayout.tsx +++ b/app/components/ResumeLayout.tsx @@ -18,7 +18,7 @@ const ResumeLayout: FC = ({ printable, children }) => ( mb={printable ? 0 : 135} bg="var(--mantine-color-white)" c="var(--mantine-color-black)" - className={classes.container} + className={cx("resume-layout", classes.container)} {...(printable && { "data-printable": true })} > {children} diff --git a/app/controllers/resumes_controller.rb b/app/controllers/resumes_controller.rb index cd958b71..3f4b4d55 100644 --- a/app/controllers/resumes_controller.rb +++ b/app/controllers/resumes_controller.rb @@ -29,14 +29,11 @@ def show render(json: Resume.current(variant: variant&.to_sym)) end format.pdf do - data = print_resume(variant: variant&.to_sym) name = ["kai-xie-resume", variant].compact.join("--") - send_data( - data, - filename: "#{name}.pdf", - type: "application/pdf", - disposition: "inline", - ) + Tempfile.open([name, ".pdf"]) do |tempfile| + print_resume_to_tempfile(tempfile, variant: variant&.to_sym) + send_file(tempfile.path, disposition: "inline") + end end end end @@ -51,54 +48,27 @@ def self.print_resume_semaphore # == Helpers sig do - returns(T.all( - Selenium::WebDriver::Chrome::Driver, - Selenium::WebDriver::DriverExtensions::PrintsPage, - )) + params(tempfile: Tempfile, variant: T.nilable(Symbol)).void end - def webdriver - @webdriver ||= T.let( - Selenium::WebDriver.for( - :chrome, - options: Selenium::WebDriver::Chrome::Options.new.tap do |options| - options = T.let(options, Selenium::WebDriver::Chrome::Options) - options.add_argument("--headless") - options.add_argument("--window-size=1400,1000") - options.add_argument("--kiosk-printing") - if OS.linux? - options.add_argument("--no-sandbox") - options.add_argument("--disable-dev-shm-usage") - end - end, - ), - T.nilable(T.all( - Selenium::WebDriver::Chrome::Driver, - Selenium::WebDriver::DriverExtensions::PrintsPage, - )), - ) - end - - sig { params(variant: T.nilable(Symbol)).returns(String) } - def print_resume(variant:) + def print_resume_to_tempfile(tempfile, variant: nil) self.class.print_resume_semaphore.acquire do - params = { variant:, _printable: true } - url = resume_url( - protocol: "http", - host: "localhost", - port: ENV.fetch("RAILS_PORT") { 3000 }.to_i, - **params.compact, - ) - driver = webdriver - driver.get(url) - Selenium::WebDriver::Wait.new.until do - driver.execute_script( - "return window.performance.timing.loadEventEnd > 0", - ) && driver.execute_script( - 'return window.performance.getEntriesByType("paint").length > 0', - ) + Playwright.create( + playwright_cli_executable_path: "playwright", + ) do |playwright| + playwright.chromium.launch do |browser| + page = T.let(browser.new_page, Playwright::Page) + params = { variant:, _printable: true } + url = resume_url( + protocol: "http", + host: "localhost", + port: request.port, + **params.compact, + ) + page.goto(url) + page.wait_for_selector(".resume-layout") + page.pdf(path: tempfile.path) + end end - page_str = driver.print_page - Base64.decode64(page_str) end end end diff --git a/bin/setup b/bin/setup index ca355532..03987ed2 100755 --- a/bin/setup +++ b/bin/setup @@ -35,9 +35,13 @@ FileUtils.chdir APP_ROOT do puts "\n=> Install Python dependencies" system! "poetry install --no-root" - puts "\n=> Installing githooks" + puts "\n=> Installing git hooks" system! "bin/yarn husky install" + puts "\n=> Installing Playwright" + system! "bin/yarn global add playwright" + system! "playwright install" + # puts "\n=> Copying sample files" # unless File.exist?("config/database.yml") # FileUtils.cp "config/database.yml.sample", "config/database.yml" diff --git a/bin/test b/bin/test index c0a369ea..b7985fb6 100755 --- a/bin/test +++ b/bin/test @@ -10,6 +10,6 @@ bin/rails assets:clobber bin/rails assets:precompile echo -e "\n=> Running tests" -set +e -bin/overmind start -f Procfile.test --no-port "$@" -if [ "$?" -ne 130 ]; then exit $?; fi +EXIT_CODE=0 +bin/overmind start -f Procfile.test --no-port "$@" || EXIT_CODE=$? +if [ "$EXIT_CODE" -ne 130 ]; then exit $EXIT_CODE; fi diff --git a/config/initializers/capybara.rb b/config/initializers/capybara.rb index 1725b00d..81073cab 100644 --- a/config/initializers/capybara.rb +++ b/config/initializers/capybara.rb @@ -3,14 +3,9 @@ return unless defined?(Capybara) -if Rails.env.test? - Capybara.register_driver(:headless_chrome) do |app| - Capybara::Selenium::Driver.new( - app, - browser: :chrome, - options: Selenium::WebDriver::Chrome::Options.new( - args: %w[headless window-size=1400,1000], - ), - ) - end +Capybara.default_max_wait_time = 15 +Capybara.register_driver(:playwright) do |app| + Capybara::Playwright::Driver.new(app) end +Capybara.default_driver = :playwright +Capybara.javascript_driver = :playwright diff --git a/sorbet/rbi/gems/addressable@2.8.5.rbi b/sorbet/rbi/gems/addressable@2.8.6.rbi similarity index 90% rename from sorbet/rbi/gems/addressable@2.8.5.rbi rename to sorbet/rbi/gems/addressable@2.8.6.rbi index 932b611e..9b249f24 100644 --- a/sorbet/rbi/gems/addressable@2.8.5.rbi +++ b/sorbet/rbi/gems/addressable@2.8.6.rbi @@ -790,7 +790,7 @@ class Addressable::URI # @param [String, [Hash] a customizable set of options # @return [Addressable::URI] The constructed URI object. # - # source://addressable//lib/addressable/uri.rb#819 + # source://addressable//lib/addressable/uri.rb#830 def initialize(options = T.unsafe(nil)); end # Joins two URIs together. @@ -798,7 +798,7 @@ class Addressable::URI # @param The [String, Addressable::URI, #to_str] URI to join with. # @return [Addressable::URI] The joined URI. # - # source://addressable//lib/addressable/uri.rb#1878 + # source://addressable//lib/addressable/uri.rb#1889 def +(uri); end # Returns true if the URI objects are equal. This method @@ -808,7 +808,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URIs are equivalent, false # otherwise. # - # source://addressable//lib/addressable/uri.rb#2228 + # source://addressable//lib/addressable/uri.rb#2239 def ==(uri); end # Returns true if the URI objects are equal. This method @@ -819,7 +819,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URIs are equivalent, false # otherwise. # - # source://addressable//lib/addressable/uri.rb#2206 + # source://addressable//lib/addressable/uri.rb#2217 def ===(uri); end # Determines if the URI is absolute. @@ -827,7 +827,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URI is absolute. false # otherwise. # - # source://addressable//lib/addressable/uri.rb#1868 + # source://addressable//lib/addressable/uri.rb#1879 def absolute?; end # The authority component for this URI. @@ -835,21 +835,21 @@ class Addressable::URI # # @return [String] The authority component. # - # source://addressable//lib/addressable/uri.rb#1223 + # source://addressable//lib/addressable/uri.rb#1234 def authority; end # Sets the authority component for this URI. # # @param new_authority [String, #to_str] The new authority component. # - # source://addressable//lib/addressable/uri.rb#1263 + # source://addressable//lib/addressable/uri.rb#1274 def authority=(new_authority); end # The basename, if any, of the file in the path component. # # @return [String] The path's basename. # - # source://addressable//lib/addressable/uri.rb#1577 + # source://addressable//lib/addressable/uri.rb#1588 def basename; end # The default port for this URI's scheme. @@ -858,7 +858,7 @@ class Addressable::URI # # @return [Integer] The default port. # - # source://addressable//lib/addressable/uri.rb#1443 + # source://addressable//lib/addressable/uri.rb#1454 def default_port; end # This method allows you to make several changes to a URI simultaneously, @@ -868,7 +868,7 @@ class Addressable::URI # # @param block [Proc] A set of operations to perform on a given URI. # - # source://addressable//lib/addressable/uri.rb#2385 + # source://addressable//lib/addressable/uri.rb#2396 def defer_validation; end # Creates a URI suitable for display to users. If semantic attacks are @@ -878,7 +878,7 @@ class Addressable::URI # # @return [Addressable::URI] A URI suitable for display purposes. # - # source://addressable//lib/addressable/uri.rb#2190 + # source://addressable//lib/addressable/uri.rb#2201 def display_uri; end # Returns the public suffix domain for this host. @@ -886,24 +886,24 @@ class Addressable::URI # @example # Addressable::URI.parse("http://www.example.co.uk").domain # => "example.co.uk" # - # source://addressable//lib/addressable/uri.rb#1214 + # source://addressable//lib/addressable/uri.rb#1225 def domain; end # Clones the URI object. # # @return [Addressable::URI] The cloned URI. # - # source://addressable//lib/addressable/uri.rb#2260 + # source://addressable//lib/addressable/uri.rb#2271 def dup; end # Determines if the URI is an empty string. # # @return [TrueClass, FalseClass] Returns true if empty, false otherwise. # - # source://addressable//lib/addressable/uri.rb#2322 + # source://addressable//lib/addressable/uri.rb#2333 def empty?; end - # source://addressable//lib/addressable/uri.rb#2395 + # source://addressable//lib/addressable/uri.rb#2406 def encode_with(coder); end # Returns true if the URI objects are equal. This method @@ -913,7 +913,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URIs are equivalent, false # otherwise. # - # source://addressable//lib/addressable/uri.rb#2242 + # source://addressable//lib/addressable/uri.rb#2253 def eql?(uri); end # The extname, if any, of the file in the path component. @@ -921,28 +921,28 @@ class Addressable::URI # # @return [String] The path's extname. # - # source://addressable//lib/addressable/uri.rb#1587 + # source://addressable//lib/addressable/uri.rb#1598 def extname; end # The fragment component for this URI. # # @return [String] The fragment component. # - # source://addressable//lib/addressable/uri.rb#1799 + # source://addressable//lib/addressable/uri.rb#1810 def fragment; end # Sets the fragment component for this URI. # # @param new_fragment [String, #to_str] The new fragment component. # - # source://addressable//lib/addressable/uri.rb#1824 + # source://addressable//lib/addressable/uri.rb#1835 def fragment=(new_fragment); end # Freeze URI, initializing instance variables. # # @return [Addressable::URI] The frozen URI object. # - # source://addressable//lib/addressable/uri.rb#859 + # source://addressable//lib/addressable/uri.rb#870 def freeze; end # A hash value that will make a URI equivalent to its normalized @@ -950,21 +950,21 @@ class Addressable::URI # # @return [Integer] A hash of the URI. # - # source://addressable//lib/addressable/uri.rb#2252 + # source://addressable//lib/addressable/uri.rb#2263 def hash; end # The host component for this URI. # # @return [String] The host component. # - # source://addressable//lib/addressable/uri.rb#1109 + # source://addressable//lib/addressable/uri.rb#1120 def host; end # Sets the host component for this URI. # # @param new_host [String, #to_str] The new host component. # - # source://addressable//lib/addressable/uri.rb#1145 + # source://addressable//lib/addressable/uri.rb#1156 def host=(new_host); end # This method is same as URI::Generic#host except @@ -973,7 +973,7 @@ class Addressable::URI # @return [String] The hostname for this URI. # @see Addressable::URI#host # - # source://addressable//lib/addressable/uri.rb#1167 + # source://addressable//lib/addressable/uri.rb#1178 def hostname; end # This method is same as URI::Generic#host= except @@ -982,7 +982,7 @@ class Addressable::URI # @param new_hostname [String, #to_str] The new hostname for this URI. # @see Addressable::URI#host= # - # source://addressable//lib/addressable/uri.rb#1179 + # source://addressable//lib/addressable/uri.rb#1190 def hostname=(new_hostname); end # The inferred port component for this URI. @@ -991,17 +991,17 @@ class Addressable::URI # # @return [Integer] The inferred port component. # - # source://addressable//lib/addressable/uri.rb#1429 + # source://addressable//lib/addressable/uri.rb#1440 def inferred_port; end - # source://addressable//lib/addressable/uri.rb#2406 + # source://addressable//lib/addressable/uri.rb#2417 def init_with(coder); end # Returns a String representation of the URI object's state. # # @return [String] The URI object's state, as a String. # - # source://addressable//lib/addressable/uri.rb#2373 + # source://addressable//lib/addressable/uri.rb#2384 def inspect; end # Determines if the scheme indicates an IP-based protocol. @@ -1009,7 +1009,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the scheme indicates an IP-based protocol. # false otherwise. # - # source://addressable//lib/addressable/uri.rb#1844 + # source://addressable//lib/addressable/uri.rb#1855 def ip_based?; end # Joins two URIs together. @@ -1017,7 +1017,7 @@ class Addressable::URI # @param The [String, Addressable::URI, #to_str] URI to join with. # @return [Addressable::URI] The joined URI. # - # source://addressable//lib/addressable/uri.rb#1878 + # source://addressable//lib/addressable/uri.rb#1889 def join(uri); end # Destructive form of join. @@ -1026,7 +1026,7 @@ class Addressable::URI # @return [Addressable::URI] The joined URI. # @see Addressable::URI#join # - # source://addressable//lib/addressable/uri.rb#1981 + # source://addressable//lib/addressable/uri.rb#1992 def join!(uri); end # Merges a URI with a Hash of components. @@ -1038,7 +1038,7 @@ class Addressable::URI # @return [Addressable::URI] The merged URI. # @see Hash#merge # - # source://addressable//lib/addressable/uri.rb#1996 + # source://addressable//lib/addressable/uri.rb#2007 def merge(hash); end # Destructive form of merge. @@ -1047,7 +1047,7 @@ class Addressable::URI # @return [Addressable::URI] The merged URI. # @see Addressable::URI#merge # - # source://addressable//lib/addressable/uri.rb#2061 + # source://addressable//lib/addressable/uri.rb#2072 def merge!(uri); end # Returns a normalized URI object. @@ -1060,7 +1060,7 @@ class Addressable::URI # # @return [Addressable::URI] The normalized URI. # - # source://addressable//lib/addressable/uri.rb#2153 + # source://addressable//lib/addressable/uri.rb#2164 def normalize; end # Destructively normalizes this URI object. @@ -1068,63 +1068,63 @@ class Addressable::URI # @return [Addressable::URI] The normalized URI. # @see Addressable::URI#normalize # - # source://addressable//lib/addressable/uri.rb#2179 + # source://addressable//lib/addressable/uri.rb#2190 def normalize!; end # The authority component for this URI, normalized. # # @return [String] The authority component, normalized. # - # source://addressable//lib/addressable/uri.rb#1241 + # source://addressable//lib/addressable/uri.rb#1252 def normalized_authority; end # The fragment component for this URI, normalized. # # @return [String] The fragment component, normalized. # - # source://addressable//lib/addressable/uri.rb#1805 + # source://addressable//lib/addressable/uri.rb#1816 def normalized_fragment; end # The host component for this URI, normalized. # # @return [String] The host component, normalized. # - # source://addressable//lib/addressable/uri.rb#1115 + # source://addressable//lib/addressable/uri.rb#1126 def normalized_host; end # The password component for this URI, normalized. # # @return [String] The password component, normalized. # - # source://addressable//lib/addressable/uri.rb#991 + # source://addressable//lib/addressable/uri.rb#1002 def normalized_password; end # The path component for this URI, normalized. # # @return [String] The path component, normalized. # - # source://addressable//lib/addressable/uri.rb#1524 + # source://addressable//lib/addressable/uri.rb#1535 def normalized_path; end # The port component for this URI, normalized. # # @return [Integer] The port component, normalized. # - # source://addressable//lib/addressable/uri.rb#1381 + # source://addressable//lib/addressable/uri.rb#1392 def normalized_port; end # The query component for this URI, normalized. # # @return [String] The query component, normalized. # - # source://addressable//lib/addressable/uri.rb#1602 + # source://addressable//lib/addressable/uri.rb#1613 def normalized_query(*flags); end # The scheme component for this URI, normalized. # # @return [String] The scheme component, normalized. # - # source://addressable//lib/addressable/uri.rb#885 + # source://addressable//lib/addressable/uri.rb#896 def normalized_scheme; end # The normalized combination of components that represent a site. @@ -1136,21 +1136,21 @@ class Addressable::URI # # @return [String] The normalized components that identify a site. # - # source://addressable//lib/addressable/uri.rb#1474 + # source://addressable//lib/addressable/uri.rb#1485 def normalized_site; end # The user component for this URI, normalized. # # @return [String] The user component, normalized. # - # source://addressable//lib/addressable/uri.rb#936 + # source://addressable//lib/addressable/uri.rb#947 def normalized_user; end # The userinfo component for this URI, normalized. # # @return [String] The userinfo component, normalized. # - # source://addressable//lib/addressable/uri.rb#1057 + # source://addressable//lib/addressable/uri.rb#1068 def normalized_userinfo; end # Omits components from a URI. @@ -1163,7 +1163,7 @@ class Addressable::URI # @param *components [Symbol] The components to be omitted. # @return [Addressable::URI] The URI with components omitted. # - # source://addressable//lib/addressable/uri.rb#2286 + # source://addressable//lib/addressable/uri.rb#2297 def omit(*components); end # Destructive form of omit. @@ -1172,7 +1172,7 @@ class Addressable::URI # @return [Addressable::URI] The URI with components omitted. # @see Addressable::URI#omit # - # source://addressable//lib/addressable/uri.rb#2313 + # source://addressable//lib/addressable/uri.rb#2324 def omit!(*components); end # The origin for this URI, serialized to ASCII, as per @@ -1180,7 +1180,7 @@ class Addressable::URI # # @return [String] The serialized origin. # - # source://addressable//lib/addressable/uri.rb#1303 + # source://addressable//lib/addressable/uri.rb#1314 def origin; end # Sets the origin for this URI, serialized to ASCII, as per @@ -1189,35 +1189,35 @@ class Addressable::URI # # @param new_origin [String, #to_str] The new origin component. # - # source://addressable//lib/addressable/uri.rb#1322 + # source://addressable//lib/addressable/uri.rb#1333 def origin=(new_origin); end # The password component for this URI. # # @return [String] The password component. # - # source://addressable//lib/addressable/uri.rb#985 + # source://addressable//lib/addressable/uri.rb#996 def password; end # Sets the password component for this URI. # # @param new_password [String, #to_str] The new password component. # - # source://addressable//lib/addressable/uri.rb#1014 + # source://addressable//lib/addressable/uri.rb#1025 def password=(new_password); end # The path component for this URI. # # @return [String] The path component. # - # source://addressable//lib/addressable/uri.rb#1517 + # source://addressable//lib/addressable/uri.rb#1528 def path; end # Sets the path component for this URI. # # @param new_path [String, #to_str] The new path component. # - # source://addressable//lib/addressable/uri.rb#1556 + # source://addressable//lib/addressable/uri.rb#1567 def path=(new_path); end # The port component for this URI. @@ -1226,28 +1226,28 @@ class Addressable::URI # # @return [Integer] The port component. # - # source://addressable//lib/addressable/uri.rb#1375 + # source://addressable//lib/addressable/uri.rb#1386 def port; end # Sets the port component for this URI. # # @param new_port [String, Integer, #to_s] The new port component. # - # source://addressable//lib/addressable/uri.rb#1397 + # source://addressable//lib/addressable/uri.rb#1408 def port=(new_port); end # The query component for this URI. # # @return [String] The query component. # - # source://addressable//lib/addressable/uri.rb#1596 + # source://addressable//lib/addressable/uri.rb#1607 def query; end # Sets the query component for this URI. # # @param new_query [String, #to_str] The new query component. # - # source://addressable//lib/addressable/uri.rb#1630 + # source://addressable//lib/addressable/uri.rb#1641 def query=(new_query); end # Converts the query component to a Hash value. @@ -1268,7 +1268,7 @@ class Addressable::URI # @return [Hash, Array, nil] The query string parsed as a Hash or Array # or nil if the query string is blank. # - # source://addressable//lib/addressable/uri.rb#1661 + # source://addressable//lib/addressable/uri.rb#1672 def query_values(return_type = T.unsafe(nil)); end # Sets the query component for this URI from a Hash object. @@ -1289,7 +1289,7 @@ class Addressable::URI # # => "flag&key=value" # @param new_query_values [Hash, #to_hash, Array] The new query values. # - # source://addressable//lib/addressable/uri.rb#1712 + # source://addressable//lib/addressable/uri.rb#1723 def query_values=(new_query_values); end # Determines if the URI is relative. @@ -1297,7 +1297,7 @@ class Addressable::URI # @return [TrueClass, FalseClass] true if the URI is relative. false # otherwise. # - # source://addressable//lib/addressable/uri.rb#1858 + # source://addressable//lib/addressable/uri.rb#1869 def relative?; end # The HTTP request URI for this URI. This is the path and the @@ -1305,14 +1305,14 @@ class Addressable::URI # # @return [String] The request URI required for an HTTP request. # - # source://addressable//lib/addressable/uri.rb#1763 + # source://addressable//lib/addressable/uri.rb#1774 def request_uri; end # Sets the HTTP request URI for this URI. # # @param new_request_uri [String, #to_str] The new HTTP request URI. # - # source://addressable//lib/addressable/uri.rb#1775 + # source://addressable//lib/addressable/uri.rb#1786 def request_uri=(new_request_uri); end # Returns the shortest normalized relative form of this URI that uses the @@ -1322,7 +1322,7 @@ class Addressable::URI # @param uri [String, Addressable::URI, #to_str] The URI to route from. # @return [Addressable::URI] The normalized relative URI that is equivalent to the original URI. # - # source://addressable//lib/addressable/uri.rb#2074 + # source://addressable//lib/addressable/uri.rb#2085 def route_from(uri); end # Returns the shortest normalized relative form of the supplied URI that @@ -1332,21 +1332,21 @@ class Addressable::URI # @param uri [String, Addressable::URI, #to_str] The URI to route to. # @return [Addressable::URI] The normalized relative URI that is equivalent to the supplied URI. # - # source://addressable//lib/addressable/uri.rb#2139 + # source://addressable//lib/addressable/uri.rb#2150 def route_to(uri); end # The scheme component for this URI. # # @return [String] The scheme component. # - # source://addressable//lib/addressable/uri.rb#879 + # source://addressable//lib/addressable/uri.rb#890 def scheme; end # Sets the scheme component for this URI. # # @param new_scheme [String, #to_str] The new scheme component. # - # source://addressable//lib/addressable/uri.rb#906 + # source://addressable//lib/addressable/uri.rb#917 def scheme=(new_scheme); end # The combination of components that represent a site. @@ -1358,14 +1358,14 @@ class Addressable::URI # # @return [String] The components that identify a site. # - # source://addressable//lib/addressable/uri.rb#1456 + # source://addressable//lib/addressable/uri.rb#1467 def site; end # Sets the site value for this URI. # # @param new_site [String, #to_str] The new site value. # - # source://addressable//lib/addressable/uri.rb#1495 + # source://addressable//lib/addressable/uri.rb#1506 def site=(new_site); end # Returns the top-level domain for this host. @@ -1373,28 +1373,28 @@ class Addressable::URI # @example # Addressable::URI.parse("http://www.example.co.uk").tld # => "co.uk" # - # source://addressable//lib/addressable/uri.rb#1196 + # source://addressable//lib/addressable/uri.rb#1207 def tld; end # Sets the top-level domain for this URI. # # @param new_tld [String, #to_str] The new top-level domain. # - # source://addressable//lib/addressable/uri.rb#1204 + # source://addressable//lib/addressable/uri.rb#1215 def tld=(new_tld); end # Returns a Hash of the URI components. # # @return [Hash] The URI as a Hash of components. # - # source://addressable//lib/addressable/uri.rb#2356 + # source://addressable//lib/addressable/uri.rb#2367 def to_hash; end # Converts the URI to a String. # # @return [String] The URI's String representation. # - # source://addressable//lib/addressable/uri.rb#2330 + # source://addressable//lib/addressable/uri.rb#2341 def to_s; end # Converts the URI to a String. @@ -1402,21 +1402,21 @@ class Addressable::URI # # @return [String] The URI's String representation. # - # source://addressable//lib/addressable/uri.rb#2330 + # source://addressable//lib/addressable/uri.rb#2341 def to_str; end # The user component for this URI. # # @return [String] The user component. # - # source://addressable//lib/addressable/uri.rb#930 + # source://addressable//lib/addressable/uri.rb#941 def user; end # Sets the user component for this URI. # # @param new_user [String, #to_str] The new user component. # - # source://addressable//lib/addressable/uri.rb#959 + # source://addressable//lib/addressable/uri.rb#970 def user=(new_user); end # The userinfo component for this URI. @@ -1424,14 +1424,14 @@ class Addressable::URI # # @return [String] The userinfo component. # - # source://addressable//lib/addressable/uri.rb#1041 + # source://addressable//lib/addressable/uri.rb#1052 def userinfo; end # Sets the userinfo component for this URI. # # @param new_userinfo [String, #to_str] The new userinfo component. # - # source://addressable//lib/addressable/uri.rb#1080 + # source://addressable//lib/addressable/uri.rb#1091 def userinfo=(new_userinfo); end protected @@ -1440,14 +1440,14 @@ class Addressable::URI # # @api private # - # source://addressable//lib/addressable/uri.rb#2550 + # source://addressable//lib/addressable/uri.rb#2561 def force_utf8_encoding_if_needed(str); end # Resets composite values for the entire URI # # @api private # - # source://addressable//lib/addressable/uri.rb#2541 + # source://addressable//lib/addressable/uri.rb#2552 def remove_composite_values; end # Replaces the internal state of self with the specified URI's state. @@ -1456,7 +1456,7 @@ class Addressable::URI # @param uri [Addressable::URI] The URI to replace self with. # @return [Addressable::URI] self. # - # source://addressable//lib/addressable/uri.rb#2508 + # source://addressable//lib/addressable/uri.rb#2519 def replace_self(uri); end # Splits path string with "/" (slash). @@ -1466,12 +1466,12 @@ class Addressable::URI # @param path [String] The path to split. # @return [Array] An array of parts of path. # - # source://addressable//lib/addressable/uri.rb#2531 + # source://addressable//lib/addressable/uri.rb#2542 def split_path(path); end # Ensures that the URI is valid. # - # source://addressable//lib/addressable/uri.rb#2465 + # source://addressable//lib/addressable/uri.rb#2476 def validate; end private @@ -1480,7 +1480,7 @@ class Addressable::URI # # @api private # - # source://addressable//lib/addressable/uri.rb#2562 + # source://addressable//lib/addressable/uri.rb#2573 def reset_ivs; end class << self @@ -1509,7 +1509,7 @@ class Addressable::URI # @return [Addressable::URI] The parsed file scheme URI or the original URI if some other URI # scheme was provided. # - # source://addressable//lib/addressable/uri.rb#279 + # source://addressable//lib/addressable/uri.rb#292 def convert_path(path); end # Percent encodes any special characters in the URI. @@ -1523,7 +1523,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#605 + # source://addressable//lib/addressable/uri.rb#616 def encode(uri, return_type = T.unsafe(nil)); end # Percent encodes a URI component. @@ -1556,7 +1556,7 @@ class Addressable::URI # character_class. # @return [String] The encoded component. # - # source://addressable//lib/addressable/uri.rb#390 + # source://addressable//lib/addressable/uri.rb#403 def encode_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end # Percent encodes any special characters in the URI. @@ -1570,7 +1570,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#605 + # source://addressable//lib/addressable/uri.rb#616 def escape(uri, return_type = T.unsafe(nil)); end # Percent encodes a URI component. @@ -1603,7 +1603,7 @@ class Addressable::URI # character_class. # @return [String] The encoded component. # - # source://addressable//lib/addressable/uri.rb#390 + # source://addressable//lib/addressable/uri.rb#403 def escape_component(component, character_class = T.unsafe(nil), upcase_encoded = T.unsafe(nil)); end # Encodes a set of key/value pairs according to the rules for the @@ -1614,7 +1614,7 @@ class Addressable::URI # Defaults to false. # @return [String] The encoded value. # - # source://addressable//lib/addressable/uri.rb#729 + # source://addressable//lib/addressable/uri.rb#740 def form_encode(form_values, sort = T.unsafe(nil)); end # Decodes a String according to the rules for the @@ -1625,7 +1625,7 @@ class Addressable::URI # This is not a Hash because of the possibility for # duplicate keys. # - # source://addressable//lib/addressable/uri.rb#782 + # source://addressable//lib/addressable/uri.rb#793 def form_unencode(encoded_value); end # Converts an input to a URI. The input does not have to be a valid @@ -1639,14 +1639,14 @@ class Addressable::URI # Defaults to {:scheme => "http"}. # @return [Addressable::URI] The parsed URI. # - # source://addressable//lib/addressable/uri.rb#178 + # source://addressable//lib/addressable/uri.rb#191 def heuristic_parse(uri, hints = T.unsafe(nil)); end # Returns an array of known ip-based schemes. These schemes typically # use a similar URI form: # //:@:/ # - # source://addressable//lib/addressable/uri.rb#1358 + # source://addressable//lib/addressable/uri.rb#1369 def ip_based_schemes; end # Joins several URIs together. @@ -1659,7 +1659,7 @@ class Addressable::URI # @param *uris [String, Addressable::URI, #to_str] The URIs to join. # @return [Addressable::URI] The joined URI. # - # source://addressable//lib/addressable/uri.rb#330 + # source://addressable//lib/addressable/uri.rb#343 def join(*uris); end # Normalizes the encoding of a URI component. @@ -1701,7 +1701,7 @@ class Addressable::URI # normalized to "%2F") but otherwise left alone. # @return [String] The normalized component. # - # source://addressable//lib/addressable/uri.rb#541 + # source://addressable//lib/addressable/uri.rb#552 def normalize_component(component, character_class = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Resolves paths to their simplest form. @@ -1709,7 +1709,7 @@ class Addressable::URI # @param path [String] The path to normalize. # @return [String] The normalized path. # - # source://addressable//lib/addressable/uri.rb#2429 + # source://addressable//lib/addressable/uri.rb#2440 def normalize_path(path); end # Normalizes the encoding of a URI. Characters within a hostname are @@ -1724,7 +1724,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#660 + # source://addressable//lib/addressable/uri.rb#671 def normalized_encode(uri, return_type = T.unsafe(nil)); end # Returns a URI object based on the parsed string. @@ -1734,14 +1734,14 @@ class Addressable::URI # Addressable::URI. # @return [Addressable::URI] The parsed URI. # - # source://addressable//lib/addressable/uri.rb#101 + # source://addressable//lib/addressable/uri.rb#114 def parse(uri); end # Returns a hash of common IP-based schemes and their default port # numbers. Adding new schemes to this hash, as necessary, will allow # for better URI normalization. # - # source://addressable//lib/addressable/uri.rb#1365 + # source://addressable//lib/addressable/uri.rb#1376 def port_mapping; end # Unencodes any percent encoded characters within a URI component. @@ -1760,7 +1760,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#461 + # source://addressable//lib/addressable/uri.rb#472 def unencode(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Unencodes any percent encoded characters within a URI component. @@ -1779,7 +1779,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#461 + # source://addressable//lib/addressable/uri.rb#472 def unencode_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Unencodes any percent encoded characters within a URI component. @@ -1798,7 +1798,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#461 + # source://addressable//lib/addressable/uri.rb#472 def unescape(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end # Unencodes any percent encoded characters within a URI component. @@ -1817,7 +1817,7 @@ class Addressable::URI # The return type is determined by the return_type # parameter. # - # source://addressable//lib/addressable/uri.rb#461 + # source://addressable//lib/addressable/uri.rb#472 def unescape_component(uri, return_type = T.unsafe(nil), leave_encoded = T.unsafe(nil)); end end end @@ -1837,34 +1837,37 @@ module Addressable::URI::CharacterClasses; end # source://addressable//lib/addressable/uri.rb#47 Addressable::URI::CharacterClasses::ALPHA = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#56 +# source://addressable//lib/addressable/uri.rb#57 Addressable::URI::CharacterClasses::AUTHORITY = T.let(T.unsafe(nil), String) # source://addressable//lib/addressable/uri.rb#48 Addressable::URI::CharacterClasses::DIGIT = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#59 +# source://addressable//lib/addressable/uri.rb#60 Addressable::URI::CharacterClasses::FRAGMENT = T.let(T.unsafe(nil), String) # source://addressable//lib/addressable/uri.rb#49 Addressable::URI::CharacterClasses::GEN_DELIMS = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#55 +# source://addressable//lib/addressable/uri.rb#56 Addressable::URI::CharacterClasses::HOST = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#57 +# source://addressable//lib/addressable/uri.rb#58 Addressable::URI::CharacterClasses::PATH = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#53 +# source://addressable//lib/addressable/uri.rb#54 Addressable::URI::CharacterClasses::PCHAR = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#58 +# source://addressable//lib/addressable/uri.rb#59 Addressable::URI::CharacterClasses::QUERY = T.let(T.unsafe(nil), String) # source://addressable//lib/addressable/uri.rb#51 Addressable::URI::CharacterClasses::RESERVED = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#54 +# source://addressable//lib/addressable/uri.rb#53 +Addressable::URI::CharacterClasses::RESERVED_AND_UNRESERVED = T.let(T.unsafe(nil), String) + +# source://addressable//lib/addressable/uri.rb#55 Addressable::URI::CharacterClasses::SCHEME = T.let(T.unsafe(nil), String) # source://addressable//lib/addressable/uri.rb#50 @@ -1874,6 +1877,36 @@ Addressable::URI::CharacterClasses::SUB_DELIMS = T.let(T.unsafe(nil), String) Addressable::URI::CharacterClasses::UNRESERVED = T.let(T.unsafe(nil), String) # source://addressable//lib/addressable/uri.rb#72 +module Addressable::URI::CharacterClassesRegexps; end + +# source://addressable//lib/addressable/uri.rb#73 +Addressable::URI::CharacterClassesRegexps::AUTHORITY = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#74 +Addressable::URI::CharacterClassesRegexps::FRAGMENT = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#75 +Addressable::URI::CharacterClassesRegexps::HOST = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#76 +Addressable::URI::CharacterClassesRegexps::PATH = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#77 +Addressable::URI::CharacterClassesRegexps::QUERY = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#78 +Addressable::URI::CharacterClassesRegexps::RESERVED = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#79 +Addressable::URI::CharacterClassesRegexps::RESERVED_AND_UNRESERVED = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#80 +Addressable::URI::CharacterClassesRegexps::SCHEME = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#81 +Addressable::URI::CharacterClassesRegexps::UNRESERVED = T.let(T.unsafe(nil), Regexp) + +# source://addressable//lib/addressable/uri.rb#85 Addressable::URI::EMPTY_STR = T.let(T.unsafe(nil), String) # Raised if something other than a uri is supplied. @@ -1881,67 +1914,67 @@ Addressable::URI::EMPTY_STR = T.let(T.unsafe(nil), String) # source://addressable//lib/addressable/uri.rb#34 class Addressable::URI::InvalidURIError < ::StandardError; end -# source://addressable//lib/addressable/uri.rb#2587 +# source://addressable//lib/addressable/uri.rb#2598 module Addressable::URI::NONE; end -# source://addressable//lib/addressable/uri.rb#1519 +# source://addressable//lib/addressable/uri.rb#1530 Addressable::URI::NORMPATH = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#62 +# source://addressable//lib/addressable/uri.rb#63 module Addressable::URI::NormalizeCharacterClasses; end -# source://addressable//lib/addressable/uri.rb#67 +# source://addressable//lib/addressable/uri.rb#68 Addressable::URI::NormalizeCharacterClasses::FRAGMENT = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#63 +# source://addressable//lib/addressable/uri.rb#64 Addressable::URI::NormalizeCharacterClasses::HOST = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#65 +# source://addressable//lib/addressable/uri.rb#66 Addressable::URI::NormalizeCharacterClasses::PCHAR = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#68 +# source://addressable//lib/addressable/uri.rb#69 Addressable::URI::NormalizeCharacterClasses::QUERY = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#66 +# source://addressable//lib/addressable/uri.rb#67 Addressable::URI::NormalizeCharacterClasses::SCHEME = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#64 +# source://addressable//lib/addressable/uri.rb#65 Addressable::URI::NormalizeCharacterClasses::UNRESERVED = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#2416 +# source://addressable//lib/addressable/uri.rb#2427 Addressable::URI::PARENT = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#76 +# source://addressable//lib/addressable/uri.rb#89 Addressable::URI::PORT_MAPPING = T.let(T.unsafe(nil), Hash) -# source://addressable//lib/addressable/uri.rb#2418 +# source://addressable//lib/addressable/uri.rb#2429 Addressable::URI::RULE_2A = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#2419 +# source://addressable//lib/addressable/uri.rb#2430 Addressable::URI::RULE_2B_2C = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#2420 +# source://addressable//lib/addressable/uri.rb#2431 Addressable::URI::RULE_2D = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#2421 +# source://addressable//lib/addressable/uri.rb#2432 Addressable::URI::RULE_PREFIXED_PARENT = T.let(T.unsafe(nil), Regexp) -# source://addressable//lib/addressable/uri.rb#2415 +# source://addressable//lib/addressable/uri.rb#2426 Addressable::URI::SELF_REF = T.let(T.unsafe(nil), String) # Tables used to optimize encoding operations in `self.encode_component` # and `self.normalize_component` # -# source://addressable//lib/addressable/uri.rb#347 +# source://addressable//lib/addressable/uri.rb#360 Addressable::URI::SEQUENCE_ENCODING_TABLE = T.let(T.unsafe(nil), Array) -# source://addressable//lib/addressable/uri.rb#351 +# source://addressable//lib/addressable/uri.rb#364 Addressable::URI::SEQUENCE_UPCASED_PERCENT_ENCODING_TABLE = T.let(T.unsafe(nil), Array) -# source://addressable//lib/addressable/uri.rb#71 +# source://addressable//lib/addressable/uri.rb#84 Addressable::URI::SLASH = T.let(T.unsafe(nil), String) -# source://addressable//lib/addressable/uri.rb#74 +# source://addressable//lib/addressable/uri.rb#87 Addressable::URI::URIREGEX = T.let(T.unsafe(nil), Regexp) # source://addressable//lib/addressable/version.rb#23 diff --git a/sorbet/rbi/gems/capybara-playwright-driver@0.5.0.rbi b/sorbet/rbi/gems/capybara-playwright-driver@0.5.0.rbi new file mode 100644 index 00000000..f996d4d2 --- /dev/null +++ b/sorbet/rbi/gems/capybara-playwright-driver@0.5.0.rbi @@ -0,0 +1,1313 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `capybara-playwright-driver` gem. +# Please instead update this file by running `bin/tapioca gem capybara-playwright-driver`. + +# source://capybara-playwright-driver//lib/capybara/playwright/tmpdir_owner.rb#1 +module Capybara + class << self + # source://capybara/3.39.2/lib/capybara.rb#389 + def HTML(html); end + + # source://capybara/3.39.2/lib/capybara.rb#182 + def add_selector(name, **options, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def allow_gumbo(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def allow_gumbo=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def always_include_port(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def always_include_port=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def app(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def app=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def app_host(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def app_host=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def asset_host(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def asset_host=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def automatic_label_click(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def automatic_label_click=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def automatic_reload(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def automatic_reload=(*args, **_arg1, &block); end + + # source://capybara/3.39.2/lib/capybara.rb#114 + def configure; end + + # source://capybara/3.39.2/lib/capybara.rb#261 + def current_driver; end + + # source://capybara/3.39.2/lib/capybara.rb#270 + def current_driver=(name); end + + # source://capybara/3.39.2/lib/capybara.rb#316 + def current_session; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def default_driver(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def default_driver=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def default_host(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def default_host=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def default_max_wait_time(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def default_max_wait_time=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def default_normalize_ws(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def default_normalize_ws=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def default_retry_interval(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def default_retry_interval=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def default_selector(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def default_selector=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def default_set_options(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def default_set_options=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def disable_animation(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def disable_animation=(*args, **_arg1, &block); end + + # source://capybara/3.39.2/lib/capybara.rb#204 + def drivers; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def enable_aria_label(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def enable_aria_label=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def enable_aria_role(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def enable_aria_role=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def exact(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def exact=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def exact_text(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def exact_text=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def ignore_hidden_elements(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def ignore_hidden_elements=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def javascript_driver(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def javascript_driver=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def match(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def match=(*args, **_arg1, &block); end + + # source://capybara/3.39.2/lib/capybara.rb#261 + def mode; end + + # source://capybara/3.39.2/lib/capybara.rb#200 + def modify_selector(name, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def predicates_wait(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def predicates_wait=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def raise_server_errors(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def raise_server_errors=(*args, **_arg1, &block); end + + # source://capybara/3.39.2/lib/capybara.rb#131 + def register_driver(name, &block); end + + # source://capybara/3.39.2/lib/capybara.rb#150 + def register_server(name, &block); end + + # source://capybara/3.39.2/lib/capybara.rb#325 + def reset!; end + + # source://capybara/3.39.2/lib/capybara.rb#325 + def reset_sessions!; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def reuse_server(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def reuse_server=(*args, **_arg1, &block); end + + # source://capybara/3.39.2/lib/capybara.rb#253 + def run_default_server(app, port); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def run_server(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def run_server=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def save_path(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def save_path=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def server(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def server=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def server_errors(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def server_errors=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def server_host(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def server_host=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def server_port(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def server_port=(*args, **_arg1, &block); end + + # source://capybara/3.39.2/lib/capybara.rb#208 + def servers; end + + # source://capybara/3.39.2/lib/capybara.rb#337 + def session_name; end + + # source://capybara/3.39.2/lib/capybara.rb#345 + def session_name=(name); end + + # source://capybara/3.39.2/lib/capybara.rb#409 + def session_options; end + + # source://capybara/3.39.2/lib/capybara.rb#240 + def string(html); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def test_id(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def test_id=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def threadsafe(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def threadsafe=(*args, **_arg1, &block); end + + # source://capybara/3.39.2/lib/capybara.rb#282 + def use_default_driver; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def use_html5_parsing(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def use_html5_parsing=(*args, **_arg1, &block); end + + # source://capybara/3.39.2/lib/capybara.rb#290 + def using_driver(driver); end + + # source://capybara/3.39.2/lib/capybara.rb#357 + def using_session(name_or_session, &block); end + + # source://capybara/3.39.2/lib/capybara.rb#302 + def using_wait_time(seconds); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def visible_text_only(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def visible_text_only=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def w3c_click_offset(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def w3c_click_offset=(*args, **_arg1, &block); end + + private + + # source://capybara/3.39.2/lib/capybara.rb#415 + def config; end + + # source://capybara/3.39.2/lib/capybara.rb#419 + def session_pool; end + + # source://capybara/3.39.2/lib/capybara.rb#425 + def specified_session; end + + # source://capybara/3.39.2/lib/capybara.rb#433 + def specified_session=(session); end + end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#30 +module Capybara::CapybaraObscuredPatch + # @return [Boolean] + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#46 + def capybara_obscured?(x: T.unsafe(nil), y: T.unsafe(nil)); end +end + +# ref: https://github.com/teamcapybara/capybara/blob/f7ab0b5cd5da86185816c2d5c30d58145fe654ed/lib/capybara/selenium/node.rb#L523 +# +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#32 +Capybara::CapybaraObscuredPatch::OBSCURED_OR_OFFSET_SCRIPT = T.let(T.unsafe(nil), String) + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#2 +module Capybara::ElementClickOptionPatch + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#3 + def perform_click_action(keys, **options); end +end + +module Capybara::Node; end + +class Capybara::Node::Element < ::Capybara::Node::Base + include ::Capybara::ElementClickOptionPatch + include ::Capybara::WithElementHandlePatch +end + +# source://capybara-playwright-driver//lib/capybara/playwright/tmpdir_owner.rb#2 +module Capybara::Playwright; end + +# Responsibility of this class is: +# - Handling Capybara::Driver commands. +# - Managing Playwright browser contexts and pages. +# +# Note that this class doesn't manage Playwright::Browser. +# We should not use Playwright::Browser#close in this class. +# +# source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#11 +class Capybara::Playwright::Browser + include ::Capybara::Playwright::TmpdirOwner + extend ::Forwardable + + # @return [Browser] a new instance of Browser + # + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#17 + def initialize(driver:, playwright_browser:, page_options:, record_video: T.unsafe(nil), callback_on_save_trace: T.unsafe(nil), default_timeout: T.unsafe(nil), default_navigation_timeout: T.unsafe(nil)); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#344 + def accept_modal(dialog_type, **options, &block); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#184 + def active_element; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#55 + def clear_browser_contexts; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#303 + def close_window(handle); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#67 + def current_url; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#271 + def current_window_handle; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#350 + def dismiss_modal(dialog_type, **options, &block); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#168 + def evaluate_async_script(script, *args); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#161 + def evaluate_script(script, *args); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#154 + def execute_script(script, *args); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#102 + def find_css(query, **options); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#94 + def find_xpath(query, **options); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#335 + def fullscreen_window(handle); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#142 + def go_back; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#148 + def go_forward; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#122 + def html; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#325 + def maximize_window(handle); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#275 + def open_new_window(kind = T.unsafe(nil)); end + + # Not used by Capybara::Session. + # Intended to be directly called by user. + # + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#203 + def raw_screenshot(**options); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#88 + def refresh; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#319 + def resize_window_to(handle, width, height); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#110 + def response_headers; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#209 + def save_screenshot(path, **options); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#215 + def send_keys(*args); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#116 + def status_code; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#219 + def switch_to_frame(frame); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#295 + def switch_to_window(handle); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#136 + def title; end + + # Not used by Capybara::Session. + # Intended to be directly called by user. + # + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#195 + def video_path; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#73 + def visit(path); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#267 + def window_handles; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#313 + def window_size(handle); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#402 + def with_playwright_page(&block); end + + private + + # Capybara doesn't retry at this case since it doesn't use `synchronize { ... } for driver/browser methods.` + # We have to retry ourselves. + # + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#236 + def assert_page_alive(retry_count: T.unsafe(nil), &block); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#30 + def create_browser_context; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#45 + def create_page(browser_context); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#286 + def on_window(handle, &block); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#263 + def pages; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#356 + def unwrap_node(args); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#366 + def wrap_node(arg); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/browser.rb#15 +class Capybara::Playwright::Browser::NoSuchWindowError < ::StandardError; end + +# source://capybara-playwright-driver//lib/capybara/playwright/browser_options.rb#3 +class Capybara::Playwright::BrowserOptions + # @return [BrowserOptions] a new instance of BrowserOptions + # + # source://capybara-playwright-driver//lib/capybara/playwright/browser_options.rb#4 + def initialize(options); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser_options.rb#28 + def value; end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/browser_options.rb#8 +Capybara::Playwright::BrowserOptions::LAUNCH_PARAMS = T.let(T.unsafe(nil), Array) + +# playwright-ruby-client provides 3 methods to launch/connect browser. +# +# Playwright.create do |playwright| +# playwright.chromium.launch do |browser| +# +# Playwright.connect_to_playwright_server do |playwright| ... +# playwright.chromium.launch do |browser| +# +# Playwright.connect_to_browser_server do |browser| ... +# +# This class provides start/stop methods for driver. +# This is responsible for +# - managing PlaywrightExecution +# - launching browser with given option if needed +# +# source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#17 +class Capybara::Playwright::BrowserRunner + # @return [BrowserRunner] a new instance of BrowserRunner + # + # source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#76 + def initialize(options); end + + # @return [::Playwright::Browser] + # + # source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#88 + def start; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#93 + def stop; end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#39 +class Capybara::Playwright::BrowserRunner::PlaywrightConnectToBrowserServer + # @return [PlaywrightConnectToBrowserServer] a new instance of PlaywrightConnectToBrowserServer + # + # source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#40 + def initialize(endpoint_url); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#48 + def playwright_browser; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#44 + def playwright_execution; end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#18 +class Capybara::Playwright::BrowserRunner::PlaywrightConnectToPlaywrightServer + # @return [PlaywrightConnectToPlaywrightServer] a new instance of PlaywrightConnectToPlaywrightServer + # + # source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#19 + def initialize(endpoint_url, options); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#32 + def playwright_browser; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#28 + def playwright_execution; end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#53 +class Capybara::Playwright::BrowserRunner::PlaywrightCreate + # @return [PlaywrightCreate] a new instance of PlaywrightCreate + # + # source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#54 + def initialize(options); end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#69 + def playwright_browser; end + + # source://capybara-playwright-driver//lib/capybara/playwright/browser_runner.rb#63 + def playwright_execution; end +end + +# LILO event handler +# +# source://capybara-playwright-driver//lib/capybara/playwright/dialog_event_handler.rb#6 +class Capybara::Playwright::DialogEventHandler + # @return [DialogEventHandler] a new instance of DialogEventHandler + # + # source://capybara-playwright-driver//lib/capybara/playwright/dialog_event_handler.rb#20 + def initialize; end + + # source://capybara-playwright-driver//lib/capybara/playwright/dialog_event_handler.rb#27 + def add_handler(callable); end + + # Sets the attribute default_handler + # + # @param value the value to set the attribute default_handler to. + # + # source://capybara-playwright-driver//lib/capybara/playwright/dialog_event_handler.rb#25 + def default_handler=(_arg0); end + + # source://capybara-playwright-driver//lib/capybara/playwright/dialog_event_handler.rb#50 + def handle_dialog(dialog); end + + # source://capybara-playwright-driver//lib/capybara/playwright/dialog_event_handler.rb#35 + def remove_handler(id); end + + # source://capybara-playwright-driver//lib/capybara/playwright/dialog_event_handler.rb#41 + def with_handler(callable, &block); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/dialog_event_handler.rb#7 +class Capybara::Playwright::DialogEventHandler::Item + # @return [Item] a new instance of Item + # + # source://capybara-playwright-driver//lib/capybara/playwright/dialog_event_handler.rb#8 + def initialize(dialog_proc); end + + # source://capybara-playwright-driver//lib/capybara/playwright/dialog_event_handler.rb#15 + def call(dialog); end + + # Returns the value of attribute id. + # + # source://capybara-playwright-driver//lib/capybara/playwright/dialog_event_handler.rb#13 + def id; end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/driver.rb#5 +class Capybara::Playwright::Driver < ::Capybara::Driver::Base + include ::Capybara::Playwright::DriverExtension + extend ::Forwardable + + # @return [Driver] a new instance of Driver + # + # source://capybara-playwright-driver//lib/capybara/playwright/driver.rb#9 + def initialize(app, **options); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def accept_modal(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def active_element(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def close_window(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def current_url(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def current_window_handle(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def dismiss_modal(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def evaluate_async_script(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def evaluate_script(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def execute_script(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def find_css(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def find_xpath(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def fullscreen_window(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def go_back(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def go_forward(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def html(*args, **_arg1, &block); end + + # source://capybara-playwright-driver//lib/capybara/playwright/driver.rb#85 + def invalid_element_errors; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def maximize_window(*args, **_arg1, &block); end + + # @return [Boolean] + # + # source://capybara-playwright-driver//lib/capybara/playwright/driver.rb#24 + def needs_server?; end + + # source://capybara-playwright-driver//lib/capybara/playwright/driver.rb#92 + def no_such_window_error; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def open_new_window(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def refresh(*args, **_arg1, &block); end + + # source://capybara-playwright-driver//lib/capybara/playwright/driver.rb#61 + def reset!; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def resize_window_to(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def response_headers(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def save_screenshot(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def send_keys(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def status_code(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def switch_to_frame(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def switch_to_window(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def title(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def visit(*args, **_arg1, &block); end + + # @return [Boolean] + # + # source://capybara-playwright-driver//lib/capybara/playwright/driver.rb#23 + def wait?; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def window_handles(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def window_size(*args, **_arg1, &block); end + + private + + # source://capybara-playwright-driver//lib/capybara/playwright/driver.rb#26 + def browser; end + + # source://capybara-playwright-driver//lib/capybara/playwright/driver.rb#42 + def create_playwright_browser; end + + # source://capybara-playwright-driver//lib/capybara/playwright/driver.rb#38 + def playwright_browser; end + + # source://capybara-playwright-driver//lib/capybara/playwright/driver.rb#55 + def quit; end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/driver_extension.rb#3 +module Capybara::Playwright::DriverExtension + # Register screenshot save process. + # The callback is called just before page is closed. + # (just before #reset_session!) + # + # The **binary** (String) of the page screenshot is called back into the given block + # + # source://capybara-playwright-driver//lib/capybara/playwright/driver_extension.rb#9 + def on_save_raw_screenshot_before_reset(&block); end + + # Register screenrecord save process. + # The callback is called just after page is closed. + # (just after #reset_session!) + # + # The video path (String) is called back into the given block + # + # source://capybara-playwright-driver//lib/capybara/playwright/driver_extension.rb#26 + def on_save_screenrecord(&block); end + + # Register trace save process. + # The callback is called just after trace is saved. + # + # The trace.zip path (String) is called back into the given block + # + # source://capybara-playwright-driver//lib/capybara/playwright/driver_extension.rb#42 + def on_save_trace(&block); end + + # Start Playwright tracing (doc: https://playwright.dev/docs/api/class-tracing#tracing-start) + # + # source://capybara-playwright-driver//lib/capybara/playwright/driver_extension.rb#53 + def start_tracing(name: T.unsafe(nil), screenshots: T.unsafe(nil), snapshots: T.unsafe(nil), sources: T.unsafe(nil), title: T.unsafe(nil)); end + + # Stop Playwright tracing (doc: https://playwright.dev/docs/api/class-tracing#tracing-stop) + # + # source://capybara-playwright-driver//lib/capybara/playwright/driver_extension.rb#63 + def stop_tracing(path: T.unsafe(nil)); end + + # Trace execution of the given block. The tracing is automatically stopped when the block is finished. + # + # source://capybara-playwright-driver//lib/capybara/playwright/driver_extension.rb#70 + def trace(name: T.unsafe(nil), screenshots: T.unsafe(nil), snapshots: T.unsafe(nil), sources: T.unsafe(nil), title: T.unsafe(nil), path: T.unsafe(nil), &block); end + + # @raise [ArgumentError] + # + # source://capybara-playwright-driver//lib/capybara/playwright/driver_extension.rb#46 + def with_playwright_page(&block); end + + private + + # source://capybara-playwright-driver//lib/capybara/playwright/driver_extension.rb#34 + def callback_on_save_screenrecord(video_path); end + + # @return [Boolean] + # + # source://capybara-playwright-driver//lib/capybara/playwright/driver_extension.rb#30 + def callback_on_save_screenrecord?; end + + # source://capybara-playwright-driver//lib/capybara/playwright/driver_extension.rb#17 + def callback_on_save_screenshot(raw_screenshot); end + + # @return [Boolean] + # + # source://capybara-playwright-driver//lib/capybara/playwright/driver_extension.rb#13 + def callback_on_save_screenshot?; end +end + +# Selector and checking methods are derived from twapole/apparition +# Action methods (click, select_option, ...) uses playwright. +# +# ref: +# selenium: https://github.com/teamcapybara/capybara/blob/master/lib/capybara/selenium/node.rb +# apparition: https://github.com/twalpole/apparition/blob/master/lib/capybara/apparition/node.rb +# +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#66 +class Capybara::Playwright::Node < ::Capybara::Driver::Node + # @return [Node] a new instance of Node + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#67 + def initialize(driver, page, element); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#927 + def ==(other); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#141 + def [](name); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#108 + def all_text; end + + # @return [Boolean] + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#830 + def checked?; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#361 + def click(keys = T.unsafe(nil), **options); end + + # @return [Boolean] + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#842 + def disabled?; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#373 + def double_click(keys = T.unsafe(nil), **options); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#631 + def drag_to(element, **options); end + + # @raise [NotImplementedError] + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#705 + def drop(*args); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#941 + def find_css(query, **options); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#933 + def find_xpath(query, **options); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#627 + def hover; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#923 + def inspect; end + + # @return [Boolean] + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#858 + def multiple?; end + + # @return [Boolean] + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#826 + def obscured?; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#874 + def path; end + + # @return [Boolean] + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#854 + def readonly?; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#862 + def rect; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#366 + def right_click(keys = T.unsafe(nil), **options); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#709 + def scroll_by(x, y); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#724 + def scroll_to(element, location, position = T.unsafe(nil)); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#334 + def select_option; end + + # @return [Boolean] + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#836 + def selected?; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#457 + def send_keys(*args); end + + # @param value [String, Array] Array is only allowed if node has 'multiple' attribute + # @param options [Hash] Driver specific options for how to set a value on a node + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#178 + def set(value, **options); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#912 + def shadow_root; end + + # @raise [NotImplementedError] + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#170 + def style(styles); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#788 + def tag_name; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#908 + def trigger(event); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#347 + def unselect_option; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#156 + def value; end + + # @return [Boolean] + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#792 + def visible?; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#119 + def visible_text; end + + protected + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#73 + def element; end + + private + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#77 + def assert_element_not_stale(&block); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#152 + def attribute(name); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#101 + def capybara_default_wait_time; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#357 + def parent_select_element; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#147 + def property(name); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#737 + def scroll_element_to_location(element, location); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#773 + def scroll_to_coords(x, y); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#759 + def scroll_to_location(location); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#230 +class Capybara::Playwright::Node::Checkbox < ::Capybara::Playwright::Node::Settable + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#231 + def set(value, **options); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#378 +class Capybara::Playwright::Node::ClickOptions + # @return [ClickOptions] a new instance of ClickOptions + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#379 + def initialize(element, keys, options, default_timeout); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#396 + def as_params; end + + private + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#417 + def delay_ms; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#435 + def modifiers; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#443 + def position; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#405 + def timeout; end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#425 +Capybara::Playwright::Node::ClickOptions::MODIFIERS = T.let(T.unsafe(nil), Hash) + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#290 +class Capybara::Playwright::Node::DateInput < ::Capybara::Playwright::Node::Settable + include ::Capybara::Playwright::Node::UpdateValueJS + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#293 + def set(value, **options); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#314 +class Capybara::Playwright::Node::DateTimeInput < ::Capybara::Playwright::Node::Settable + include ::Capybara::Playwright::Node::UpdateValueJS + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#317 + def set(value, **options); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#635 +class Capybara::Playwright::Node::DragTo + # @param page [Playwright::Page] + # @param source [Playwright::ElementHandle] + # @param target [Playwright::ElementHandle] + # @return [DragTo] a new instance of DragTo + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#649 + def initialize(page, source, target, options); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#656 + def execute; end + + private + + # @param element [Playwright::ElementHandle] + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#678 + def center_of(element); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#690 + def drop_modifiers; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#698 + def sleep_delay; end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#683 + def with_key_pressing(keys, &block); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#636 +Capybara::Playwright::Node::DragTo::MODIFIERS = T.let(T.unsafe(nil), Hash) + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#256 +class Capybara::Playwright::Node::FileUpload < ::Capybara::Playwright::Node::Settable + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#257 + def set(value, **options); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#326 +class Capybara::Playwright::Node::JSValueInput < ::Capybara::Playwright::Node::Settable + include ::Capybara::Playwright::Node::UpdateValueJS + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#329 + def set(value, **options); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#105 +class Capybara::Playwright::Node::NotActionableError < ::StandardError; end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#224 +class Capybara::Playwright::Node::RadioButton < ::Capybara::Playwright::Node::Settable + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#225 + def set(_, **options); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#753 +Capybara::Playwright::Node::SCROLL_POSITIONS = T.let(T.unsafe(nil), Hash) + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#461 +class Capybara::Playwright::Node::SendKeys + # @return [SendKeys] a new instance of SendKeys + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#530 + def initialize(element_or_keyboard, keys); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#595 + def execute; end + + private + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#591 + def key_for(key); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#587 + def modifier_for(modifier); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#472 +Capybara::Playwright::Node::SendKeys::KEYS = T.let(T.unsafe(nil), Hash) + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#462 +Capybara::Playwright::Node::SendKeys::MODIFIERS = T.let(T.unsafe(nil), Hash) + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#601 +class Capybara::Playwright::Node::SendKeys::PressKey + # @return [PressKey] a new instance of PressKey + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#602 + def initialize(key:, modifiers:); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#611 + def execute_for(element); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#616 +class Capybara::Playwright::Node::SendKeys::TypeText + # @return [TypeText] a new instance of TypeText + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#617 + def initialize(text); end + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#621 + def execute_for(element); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#217 +class Capybara::Playwright::Node::Settable + # @return [Settable] a new instance of Settable + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#218 + def initialize(element, timeout); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#106 +class Capybara::Playwright::Node::StaleReferenceError < ::StandardError; end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#240 +class Capybara::Playwright::Node::TextInput < ::Capybara::Playwright::Node::Settable + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#241 + def set(value, **options); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#302 +class Capybara::Playwright::Node::TimeInput < ::Capybara::Playwright::Node::Settable + include ::Capybara::Playwright::Node::UpdateValueJS + + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#305 + def set(value, **options); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#270 +module Capybara::Playwright::Node::UpdateValueJS + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#271 + def update_value_js(element, value); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/page.rb#5 +module Capybara::Playwright::PageExtension + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#6 + def initialize(*args, **kwargs); end + + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#91 + def capybara_accept_modal(dialog_type, **options, &block); end + + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#180 + def capybara_current_frame; end + + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#119 + def capybara_dismiss_modal(dialog_type, **options, &block); end + + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#176 + def capybara_pop_frame; end + + # @param frame [Playwright::Frame] + # + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#172 + def capybara_push_frame(frame); end + + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#167 + def capybara_reset_frames; end + + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#153 + def capybara_response_headers; end + + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#163 + def capybara_status_code; end + + private + + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#40 + def capybara_dialog_event_handler; end + + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#15 + def capybara_initialize; end + + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#46 + def capybara_on_unexpected_modal(dialog); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/page.rb#55 +class Capybara::Playwright::PageExtension::DialogAcceptor + # @return [DialogAcceptor] a new instance of DialogAcceptor + # + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#56 + def initialize(dialog_type, options); end + + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#61 + def handle(dialog); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/page.rb#70 +class Capybara::Playwright::PageExtension::DialogMessageMatcher + # @return [DialogMessageMatcher] a new instance of DialogMessageMatcher + # + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#71 + def initialize(text_or_regex_or_nil); end + + # @return [Boolean] + # + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#79 + def matches?(message); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/page.rb#145 +class Capybara::Playwright::PageExtension::Headers < ::Hash + # source://capybara-playwright-driver//lib/capybara/playwright/page.rb#146 + def [](key); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/page_options.rb#3 +class Capybara::Playwright::PageOptions + # @return [PageOptions] a new instance of PageOptions + # + # source://capybara-playwright-driver//lib/capybara/playwright/page_options.rb#4 + def initialize(options); end + + # source://capybara-playwright-driver//lib/capybara/playwright/page_options.rb#37 + def value; end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/page_options.rb#8 +Capybara::Playwright::PageOptions::NEW_PAGE_PARAMS = T.let(T.unsafe(nil), Array) + +# source://capybara-playwright-driver//lib/capybara/playwright/shadow_root_node.rb#5 +class Capybara::Playwright::ShadowRootNode < ::Capybara::Playwright::Node + # @return [ShadowRootNode] a new instance of ShadowRootNode + # + # source://capybara-playwright-driver//lib/capybara/playwright/shadow_root_node.rb#6 + def initialize(driver, page, element); end + + # source://capybara-playwright-driver//lib/capybara/playwright/shadow_root_node.rb#11 + def all_text; end + + # source://capybara-playwright-driver//lib/capybara/playwright/shadow_root_node.rb#22 + def visible_text; end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/tmpdir_owner.rb#3 +module Capybara::Playwright::TmpdirOwner + # source://capybara-playwright-driver//lib/capybara/playwright/tmpdir_owner.rb#14 + def remove_tmpdir; end + + # source://capybara-playwright-driver//lib/capybara/playwright/tmpdir_owner.rb#6 + def tmpdir; end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/tmpdir_owner.rb#22 +class Capybara::Playwright::TmpdirOwner::TmpdirRemover + # @return [TmpdirRemover] a new instance of TmpdirRemover + # + # source://capybara-playwright-driver//lib/capybara/playwright/tmpdir_owner.rb#23 + def initialize(tmpdir); end + + # source://capybara-playwright-driver//lib/capybara/playwright/tmpdir_owner.rb#28 + def call(*args); end +end + +# source://capybara-playwright-driver//lib/capybara/playwright/version.rb#5 +Capybara::Playwright::VERSION = T.let(T.unsafe(nil), String) + +# source://capybara-playwright-driver//lib/capybara/playwright/node.rb#17 +module Capybara::WithElementHandlePatch + # @raise [ArgumentError] + # + # source://capybara-playwright-driver//lib/capybara/playwright/node.rb#18 + def with_playwright_element_handle(&block); end +end + +class Playwright::ElementHandle < ::Playwright::JSHandle + include ::Capybara::CapybaraObscuredPatch +end + +class Playwright::Page < ::Playwright::PlaywrightApi + include ::Capybara::Playwright::PageExtension +end diff --git a/sorbet/rbi/gems/playwright-ruby-client@1.40.0.rbi b/sorbet/rbi/gems/playwright-ruby-client@1.40.0.rbi new file mode 100644 index 00000000..f45c7e76 --- /dev/null +++ b/sorbet/rbi/gems/playwright-ruby-client@1.40.0.rbi @@ -0,0 +1,11534 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `playwright-ruby-client` gem. +# Please instead update this file by running `bin/tapioca gem playwright-ruby-client`. + +# namespace declaration +# +# source://playwright-ruby-client//lib/playwright.rb#4 +module Playwright + private + + # Playwright.connect_to_browser_server('ws://....') do |browser| + # page = browser.new_page + # ... + # end + # + # source://playwright-ruby-client//lib/playwright.rb#190 + def connect_to_android_server(ws_endpoint, &block); end + + # Connects to Playwright server, launched by `npx playwright launch-server chromium` or `playwright.chromium.launchServer()` + # + # Playwright.connect_to_browser_server('ws://....') do |browser| + # page = browser.new_page + # ... + # end + # + # source://playwright-ruby-client//lib/playwright.rb#149 + def connect_to_browser_server(ws_endpoint, &block); end + + # Connects to Playwright server, launched by `npx playwright run-server` via WebSocket transport. + # + # Playwright.connect_to_playwright_server(...) do |playwright| + # browser = playwright.chromium.launch + # ... + # end + # + # source://playwright-ruby-client//lib/playwright.rb#113 + def connect_to_playwright_server(ws_endpoint, &block); end + + # Recommended to call this method with block. + # + # Playwright.create(...) do |playwright| + # browser = playwright.chromium.launch + # ... + # end + # + # When we use this method without block, an instance of Playwright::Execution is returned + # and we *must* call execution.stop on the end. + # The instance of playwright is available by calling execution.playwright + # + # source://playwright-ruby-client//lib/playwright.rb#80 + def create(playwright_cli_executable_path:, &block); end + + class << self + # Playwright.connect_to_browser_server('ws://....') do |browser| + # page = browser.new_page + # ... + # end + # + # source://playwright-ruby-client//lib/playwright.rb#190 + def connect_to_android_server(ws_endpoint, &block); end + + # Connects to Playwright server, launched by `npx playwright launch-server chromium` or `playwright.chromium.launchServer()` + # + # Playwright.connect_to_browser_server('ws://....') do |browser| + # page = browser.new_page + # ... + # end + # + # source://playwright-ruby-client//lib/playwright.rb#149 + def connect_to_browser_server(ws_endpoint, &block); end + + # Connects to Playwright server, launched by `npx playwright run-server` via WebSocket transport. + # + # Playwright.connect_to_playwright_server(...) do |playwright| + # browser = playwright.chromium.launch + # ... + # end + # + # source://playwright-ruby-client//lib/playwright.rb#113 + def connect_to_playwright_server(ws_endpoint, &block); end + + # Recommended to call this method with block. + # + # Playwright.create(...) do |playwright| + # browser = playwright.chromium.launch + # ... + # end + # + # When we use this method without block, an instance of Playwright::Execution is returned + # and we *must* call execution.stop on the end. + # The instance of playwright is available by calling execution.playwright + # + # source://playwright-ruby-client//lib/playwright.rb#80 + def create(playwright_cli_executable_path:, &block); end + + # source://playwright-ruby-client//lib/playwright/api_implementation.rb#6 + def define_api_implementation(class_name, &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#149 + def define_channel_owner(class_name, &block); end + end +end + +# Exposes API that can be used for the Web API testing. This class is used for creating +# `APIRequestContext` instance which in turn can be used for sending web requests. An instance +# of this class can be obtained via [`property: Playwright.request`]. For more information +# see `APIRequestContext`. +# +# source://playwright-ruby-client//lib/playwright_api/api_request.rb#7 +class Playwright::APIRequest < ::Playwright::PlaywrightApi + # Creates new instances of `APIRequestContext`. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/api_request.rb#11 + def new_context(baseURL: T.unsafe(nil), extraHTTPHeaders: T.unsafe(nil), httpCredentials: T.unsafe(nil), ignoreHTTPSErrors: T.unsafe(nil), proxy: T.unsafe(nil), storageState: T.unsafe(nil), timeout: T.unsafe(nil), userAgent: T.unsafe(nil)); end +end + +# This API is used for the Web API testing. You can use it to trigger API endpoints, configure micro-services, prepare +# environment or the service to your e2e test. +# +# Each Playwright browser context has associated with it `APIRequestContext` instance which shares cookie storage with +# the browser context and can be accessed via [`property: BrowserContext.request`] or [`property: Page.request`]. +# It is also possible to create a new APIRequestContext instance manually by calling [`method: APIRequest.newContext`]. +# +# **Cookie management** +# +# `APIRequestContext` returned by [`property: BrowserContext.request`] and [`property: Page.request`] shares cookie +# storage with the corresponding `BrowserContext`. Each API request will have `Cookie` header populated with the +# values from the browser context. If the API response contains `Set-Cookie` header it will automatically update +# `BrowserContext` cookies and requests made from the page will pick them up. This means that if you log in using +# this API, your e2e test will be logged in and vice versa. +# +# If you want API requests to not interfere with the browser cookies you should create a new `APIRequestContext` by +# calling [`method: APIRequest.newContext`]. Such `APIRequestContext` object will have its own isolated cookie +# storage. +# +# ```python sync +# import os +# from playwright.sync_api import sync_playwright +# +# REPO = "test-repo-1" +# USER = "github-username" +# API_TOKEN = os.getenv("GITHUB_API_TOKEN") +# +# with sync_playwright() as p: +# # This will launch a new browser, create a context and page. When making HTTP +# # requests with the internal APIRequestContext (e.g. `context.request` or `page.request`) +# # it will automatically set the cookies to the browser page and vice versa. +# browser = p.chromium.launch() +# context = browser.new_context(base_url="https://api.github.com") +# api_request_context = context.request +# page = context.new_page() +# +# # Alternatively you can create a APIRequestContext manually without having a browser context attached: +# # api_request_context = p.request.new_context(base_url="https://api.github.com") +# +# +# # Create a repository. +# response = api_request_context.post( +# "/user/repos", +# headers={ +# "Accept": "application/vnd.github.v3+json", +# # Add GitHub personal access token. +# "Authorization": f"token {API_TOKEN}", +# }, +# data={"name": REPO}, +# ) +# assert response.ok +# assert response.json()["name"] == REPO +# +# # Delete a repository. +# response = api_request_context.delete( +# f"/repos/{USER}/{REPO}", +# headers={ +# "Accept": "application/vnd.github.v3+json", +# # Add GitHub personal access token. +# "Authorization": f"token {API_TOKEN}", +# }, +# ) +# assert response.ok +# assert await response.body() == '{"status": "ok"}' +# ``` +# +# source://playwright-ruby-client//lib/playwright_api/api_request_context.rb#68 +class Playwright::APIRequestContext < ::Playwright::PlaywrightApi + # Sends HTTP(S) [DELETE](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/DELETE) request and returns its response. + # The method will populate request cookies from the context and update + # context cookies from the response. The method will automatically follow redirects. + # + # source://playwright-ruby-client//lib/playwright_api/api_request_context.rb#74 + def delete(url, data: T.unsafe(nil), failOnStatusCode: T.unsafe(nil), form: T.unsafe(nil), headers: T.unsafe(nil), ignoreHTTPSErrors: T.unsafe(nil), maxRedirects: T.unsafe(nil), multipart: T.unsafe(nil), params: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # All responses returned by [`method: APIRequestContext.get`] and similar methods are stored in the memory, so that you can later call [`method: APIResponse.body`].This method discards all its resources, calling any method on disposed `APIRequestContext` will throw an exception. + # + # source://playwright-ruby-client//lib/playwright_api/api_request_context.rb#90 + def dispose; end + + # Sends HTTP(S) request and returns its response. The method will populate request cookies from the context and update + # context cookies from the response. The method will automatically follow redirects. JSON objects can be passed directly to the request. + # + # **Usage** + # + # ```python + # data = { + # "title": "Book Title", + # "body": "John Doe", + # } + # api_request_context.fetch("https://example.com/api/createBook", method="post", data=data) + # ``` + # + # The common way to send file(s) in the body of a request is to encode it as form fields with `multipart/form-data` encoding. You can achieve that with Playwright API like this: + # + # ```python + # api_request_context.fetch( + # "https://example.com/api/uploadScrip'", + # method="post", + # multipart={ + # "fileField": { + # "name": "f.js", + # "mimeType": "text/javascript", + # "buffer": b"console.log(2022);", + # }, + # }) + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/api_request_context.rb#122 + def fetch(urlOrRequest, data: T.unsafe(nil), failOnStatusCode: T.unsafe(nil), form: T.unsafe(nil), headers: T.unsafe(nil), ignoreHTTPSErrors: T.unsafe(nil), maxRedirects: T.unsafe(nil), method: T.unsafe(nil), multipart: T.unsafe(nil), params: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # Sends HTTP(S) [GET](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) request and returns its response. + # The method will populate request cookies from the context and update + # context cookies from the response. The method will automatically follow redirects. + # + # **Usage** + # + # Request parameters can be configured with `params` option, they will be serialized into the URL search parameters: + # + # ```python + # query_params = { + # "isbn": "1234", + # "page": "23" + # } + # api_request_context.get("https://example.com/api/getText", params=query_params) + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/api_request_context.rb#153 + def get(url, data: T.unsafe(nil), failOnStatusCode: T.unsafe(nil), form: T.unsafe(nil), headers: T.unsafe(nil), ignoreHTTPSErrors: T.unsafe(nil), maxRedirects: T.unsafe(nil), multipart: T.unsafe(nil), params: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # Sends HTTP(S) [HEAD](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD) request and returns its response. + # The method will populate request cookies from the context and update + # context cookies from the response. The method will automatically follow redirects. + # + # source://playwright-ruby-client//lib/playwright_api/api_request_context.rb#171 + def head(url, data: T.unsafe(nil), failOnStatusCode: T.unsafe(nil), form: T.unsafe(nil), headers: T.unsafe(nil), ignoreHTTPSErrors: T.unsafe(nil), maxRedirects: T.unsafe(nil), multipart: T.unsafe(nil), params: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/api_request_context.rb#283 + def off(event, callback); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/api_request_context.rb#295 + def on(event, callback); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/api_request_context.rb#289 + def once(event, callback); end + + # Sends HTTP(S) [PATCH](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH) request and returns its response. + # The method will populate request cookies from the context and update + # context cookies from the response. The method will automatically follow redirects. + # + # source://playwright-ruby-client//lib/playwright_api/api_request_context.rb#189 + def patch(url, data: T.unsafe(nil), failOnStatusCode: T.unsafe(nil), form: T.unsafe(nil), headers: T.unsafe(nil), ignoreHTTPSErrors: T.unsafe(nil), maxRedirects: T.unsafe(nil), multipart: T.unsafe(nil), params: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # Sends HTTP(S) [POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST) request and returns its response. + # The method will populate request cookies from the context and update + # context cookies from the response. The method will automatically follow redirects. + # + # **Usage** + # + # JSON objects can be passed directly to the request: + # + # ```python + # data = { + # "title": "Book Title", + # "body": "John Doe", + # } + # api_request_context.post("https://example.com/api/createBook", data=data) + # ``` + # + # To send form data to the server use `form` option. Its value will be encoded into the request body with `application/x-www-form-urlencoded` encoding (see below how to use `multipart/form-data` form encoding to send files): + # + # ```python + # formData = { + # "title": "Book Title", + # "body": "John Doe", + # } + # api_request_context.post("https://example.com/api/findBook", form=formData) + # ``` + # + # The common way to send file(s) in the body of a request is to upload them as form fields with `multipart/form-data` encoding. You can achieve that with Playwright API like this: + # + # ```python + # api_request_context.post( + # "https://example.com/api/uploadScrip'", + # multipart={ + # "fileField": { + # "name": "f.js", + # "mimeType": "text/javascript", + # "buffer": b"console.log(2022);", + # }, + # }) + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/api_request_context.rb#243 + def post(url, data: T.unsafe(nil), failOnStatusCode: T.unsafe(nil), form: T.unsafe(nil), headers: T.unsafe(nil), ignoreHTTPSErrors: T.unsafe(nil), maxRedirects: T.unsafe(nil), multipart: T.unsafe(nil), params: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # Sends HTTP(S) [PUT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT) request and returns its response. + # The method will populate request cookies from the context and update + # context cookies from the response. The method will automatically follow redirects. + # + # source://playwright-ruby-client//lib/playwright_api/api_request_context.rb#261 + def put(url, data: T.unsafe(nil), failOnStatusCode: T.unsafe(nil), form: T.unsafe(nil), headers: T.unsafe(nil), ignoreHTTPSErrors: T.unsafe(nil), maxRedirects: T.unsafe(nil), multipart: T.unsafe(nil), params: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # Returns storage state for this request context, contains current cookies and local storage snapshot if it was passed to the constructor. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/api_request_context.rb#277 + def storage_state(path: T.unsafe(nil)); end + + private + + # source://playwright-ruby-client//lib/playwright_api/api_request_context.rb#299 + def event_emitter_proxy; end +end + +# `APIResponse` class represents responses returned by [`method: APIRequestContext.get`] and similar methods. +# +# ```python sync +# from playwright.sync_api import sync_playwright +# +# with sync_playwright() as p: +# context = playwright.request.new_context() +# response = context.get("https://example.com/user/repos") +# assert response.ok +# assert response.status == 200 +# assert response.headers["content-type"] == "application/json; charset=utf-8" +# assert response.json()["name"] == "foobar" +# assert response.body() == '{"status": "ok"}' +# ``` +# +# source://playwright-ruby-client//lib/playwright_api/api_response.rb#17 +class Playwright::APIResponse < ::Playwright::PlaywrightApi + # Returns the buffer with response body. + # + # source://playwright-ruby-client//lib/playwright_api/api_response.rb#21 + def body; end + + # Disposes the body of this response. If not called then the body will stay in memory until the context closes. + # + # source://playwright-ruby-client//lib/playwright_api/api_response.rb#27 + def dispose; end + + # An object with all the response HTTP headers associated with this response. + # + # source://playwright-ruby-client//lib/playwright_api/api_response.rb#33 + def headers; end + + # An array with all the request HTTP headers associated with this response. Header names are not lower-cased. + # Headers with multiple entries, such as `Set-Cookie`, appear in the array multiple times. + # + # source://playwright-ruby-client//lib/playwright_api/api_response.rb#40 + def headers_array; end + + # Returns the JSON representation of response body. + # + # This method will throw if the response body is not parsable via `JSON.parse`. + # + # source://playwright-ruby-client//lib/playwright_api/api_response.rb#48 + def json; end + + # Contains a boolean stating whether the response was successful (status in the range 200-299) or not. + # + # source://playwright-ruby-client//lib/playwright_api/api_response.rb#54 + def ok; end + + # @return [Boolean] + # + # source://playwright-ruby-client//lib/playwright_api/api_response.rb#83 + def ok?; end + + # Contains the status code of the response (e.g., 200 for a success). + # + # source://playwright-ruby-client//lib/playwright_api/api_response.rb#60 + def status; end + + # Contains the status text of the response (e.g. usually an "OK" for a success). + # + # source://playwright-ruby-client//lib/playwright_api/api_response.rb#66 + def status_text; end + + # Returns the text representation of response body. + # + # source://playwright-ruby-client//lib/playwright_api/api_response.rb#72 + def text; end + + # source://playwright-ruby-client//lib/playwright_api/api_response.rb#88 + def to_s; end + + # Contains the URL of the response. + # + # source://playwright-ruby-client//lib/playwright_api/api_response.rb#78 + def url; end +end + +# source://playwright-ruby-client//lib/playwright/api_response_impl.rb#0 +class Playwright::APIResponseImpl + include ::Playwright::ApiImplementation + include ::Playwright::Utils::Errors::TargetClosedErrorMethods + + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#7 + def initialize(context, initializer); end + + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#48 + def body; end + + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#65 + def dispose; end + + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#34 + def headers; end + + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#38 + def headers_array; end + + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#61 + def json; end + + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#21 + def ok; end + + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#21 + def ok?; end + + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#26 + def status; end + + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#30 + def status_text; end + + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#48 + def text; end + + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#13 + def to_s; end + + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#17 + def url; end + + private + + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#69 + def _request; end + + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#73 + def fetch_uid; end +end + +# The Accessibility class provides methods for inspecting Chromium's accessibility tree. The accessibility tree is used by +# assistive technology such as [screen readers](https://en.wikipedia.org/wiki/Screen_reader) or +# [switches](https://en.wikipedia.org/wiki/Switch_access). +# +# Accessibility is a very platform-specific thing. On different platforms, there are different screen readers that might +# have wildly different output. +# +# Rendering engines of Chromium, Firefox and WebKit have a concept of "accessibility tree", which is then translated into different +# platform-specific APIs. Accessibility namespace gives access to this Accessibility Tree. +# +# Most of the accessibility tree gets filtered out when converting from internal browser AX Tree to Platform-specific AX-Tree or by +# assistive technologies themselves. By default, Playwright tries to approximate this filtering, exposing only the +# "interesting" nodes of the tree. +# +# source://playwright-ruby-client//lib/playwright_api/accessibility.rb#16 +class Playwright::Accessibility < ::Playwright::PlaywrightApi + # Captures the current state of the accessibility tree. The returned object represents the root accessible node of the + # page. + # + # **NOTE**: The Chromium accessibility tree contains nodes that go unused on most platforms and by most screen readers. Playwright + # will discard them as well for an easier to process tree, unless `interestingOnly` is set to `false`. + # + # **Usage** + # + # An example of dumping the entire accessibility tree: + # + # ```python sync + # snapshot = page.accessibility.snapshot() + # print(snapshot) + # ``` + # + # An example of logging the focused node's name: + # + # ```python sync + # def find_focused_node(node): + # if node.get("focused"): + # return node + # for child in (node.get("children") or []): + # found_node = find_focused_node(child) + # if found_node: + # return found_node + # return None + # + # snapshot = page.accessibility.snapshot() + # node = find_focused_node(snapshot) + # if node: + # print(node["name"]) + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/accessibility.rb#51 + def snapshot(interestingOnly: T.unsafe(nil), root: T.unsafe(nil)); end +end + +# source://playwright-ruby-client//lib/playwright/accessibility_impl.rb#0 +class Playwright::AccessibilityImpl + include ::Playwright::ApiImplementation + + # source://playwright-ruby-client//lib/playwright/accessibility_impl.rb#3 + def initialize(channel); end + + # source://playwright-ruby-client//lib/playwright/accessibility_impl.rb#7 + def snapshot(interestingOnly: T.unsafe(nil), root: T.unsafe(nil)); end + + private + + # source://playwright-ruby-client//lib/playwright/accessibility_impl.rb#19 + def format_ax_node_from_protocol(ax_node); end +end + +# source://playwright-ruby-client//lib/playwright/api_response_impl.rb#42 +class Playwright::AlreadyDisposedError < ::StandardError + # source://playwright-ruby-client//lib/playwright/api_response_impl.rb#43 + def initialize; end +end + +# Playwright has **experimental** support for Android automation. This includes Chrome for Android and Android WebView. +# +# *Requirements* +# - Android device or AVD Emulator. +# - [ADB daemon](https://developer.android.com/studio/command-line/adb) running and authenticated with your device. Typically running `adb devices` is all you need to do. +# - [`Chrome 87`](https://play.google.com/store/apps/details?id=com.android.chrome) or newer installed on the device +# - "Enable command line on non-rooted devices" enabled in `chrome://flags`. +# +# *Known limitations* +# - Raw USB operation is not yet supported, so you need ADB. +# - Device needs to be awake to produce screenshots. Enabling "Stay awake" developer mode will help. +# - We didn't run all the tests against the device, so not everything works. +# +# *How to run* +# +# An example of the Android automation script would be: +# +# Note that since you don't need Playwright to install web browsers when testing Android, you can omit browser download via setting the following environment variable when installing Playwright: +# +# ```bash js +# PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm i -D playwright +# ``` +# +# source://playwright-ruby-client//lib/playwright_api/android.rb#25 +class Playwright::Android < ::Playwright::PlaywrightApi + # This methods attaches Playwright to an existing Android device. + # Use [`method: Android.launchServer`] to launch a new Android server instance. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android.rb#30 + def connect(wsEndpoint, headers: T.unsafe(nil), slowMo: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # This setting will change the default maximum time for all the methods accepting `timeout` option. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android.rb#42 + def default_timeout=(timeout); end + + # Returns the list of detected Android devices. + # + # source://playwright-ruby-client//lib/playwright_api/android.rb#36 + def devices(host: T.unsafe(nil), omitDriverInstall: T.unsafe(nil), port: T.unsafe(nil)); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/android.rb#49 + def off(event, callback); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/android.rb#61 + def on(event, callback); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/android.rb#55 + def once(event, callback); end + + # This setting will change the default maximum time for all the methods accepting `timeout` option. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android.rb#42 + def set_default_timeout(timeout); end + + private + + # source://playwright-ruby-client//lib/playwright_api/android.rb#65 + def event_emitter_proxy; end +end + +# `AndroidDevice` represents a connected device, either real hardware or emulated. Devices can be obtained using [`method: Android.devices`]. +# +# source://playwright-ruby-client//lib/playwright_api/android_device.rb#4 +class Playwright::AndroidDevice < ::Playwright::PlaywrightApi + # Disconnects from the device. + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#12 + def close; end + + # This setting will change the default maximum time for all the methods accepting `timeout` option. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#149 + def default_timeout=(timeout); end + + # Drags the widget defined by `selector` towards `dest` point. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#18 + def drag(selector, dest, speed: T.unsafe(nil)); end + + # Fills the specific `selector` input box with `text`. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#24 + def fill(selector, text); end + + # Flings the widget defined by `selector` in the specified `direction`. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#30 + def fling(selector, direction, speed: T.unsafe(nil)); end + + # Returns information about a widget defined by `selector`. + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#36 + def info(selector); end + + # property + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#6 + def input; end + + # Installs an apk on the device. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#42 + def install_apk(file, args: T.unsafe(nil)); end + + # Launches Chrome browser on the device, and returns its persistent context. + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#48 + def launch_browser(acceptDownloads: T.unsafe(nil), args: T.unsafe(nil), baseURL: T.unsafe(nil), bypassCSP: T.unsafe(nil), colorScheme: T.unsafe(nil), command: T.unsafe(nil), deviceScaleFactor: T.unsafe(nil), extraHTTPHeaders: T.unsafe(nil), forcedColors: T.unsafe(nil), geolocation: T.unsafe(nil), hasTouch: T.unsafe(nil), httpCredentials: T.unsafe(nil), ignoreHTTPSErrors: T.unsafe(nil), isMobile: T.unsafe(nil), javaScriptEnabled: T.unsafe(nil), locale: T.unsafe(nil), noViewport: T.unsafe(nil), offline: T.unsafe(nil), permissions: T.unsafe(nil), proxy: T.unsafe(nil), record_har_content: T.unsafe(nil), record_har_mode: T.unsafe(nil), record_har_omit_content: T.unsafe(nil), record_har_path: T.unsafe(nil), record_har_url_filter: T.unsafe(nil), record_video_dir: T.unsafe(nil), record_video_size: T.unsafe(nil), reducedMotion: T.unsafe(nil), screen: T.unsafe(nil), serviceWorkers: T.unsafe(nil), strictSelectors: T.unsafe(nil), timezoneId: T.unsafe(nil), userAgent: T.unsafe(nil), viewport: T.unsafe(nil), &block); end + + # Performs a long tap on the widget defined by `selector`. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#89 + def long_tap(selector); end + + # Device model. + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#95 + def model; end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#208 + def off(event, callback); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#220 + def on(event, callback); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#214 + def once(event, callback); end + + # Launches a process in the shell on the device and returns a socket to communicate with the launched process. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#101 + def open(command); end + + # Pinches the widget defined by `selector` in the closing direction. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#107 + def pinch_close(selector, percent, speed: T.unsafe(nil)); end + + # Pinches the widget defined by `selector` in the open direction. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#113 + def pinch_open(selector, percent, speed: T.unsafe(nil)); end + + # Presses the specific `key` in the widget defined by `selector`. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#119 + def press(selector, key); end + + # Copies a file to the device. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#125 + def push(file, path, mode: T.unsafe(nil)); end + + # Returns the buffer with the captured screenshot of the device. + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#131 + def screenshot(path: T.unsafe(nil)); end + + # Scrolls the widget defined by `selector` in the specified `direction`. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#137 + def scroll(selector, direction, percent, speed: T.unsafe(nil)); end + + # Device serial number. + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#143 + def serial; end + + # This setting will change the default maximum time for all the methods accepting `timeout` option. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#149 + def set_default_timeout(timeout); end + + # Executes a shell command on the device and returns its output. + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#156 + def shell(command); end + + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#202 + def should_close_connection_on_close!; end + + # Swipes the widget defined by `selector` in the specified `direction`. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#162 + def swipe(selector, direction, percent, speed: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#197 + def tap_on(selector, duration: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # Taps on the widget defined by `selector`. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#168 + def tap_point(selector, duration: T.unsafe(nil)); end + + # Waits for the specific `selector` to either appear or disappear, depending on the `state`. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#174 + def wait(selector, state: T.unsafe(nil)); end + + # Waits for event to fire and passes its value into the predicate function. Returns when the predicate returns truthy value. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#180 + def wait_for_event(event, optionsOrPredicate: T.unsafe(nil)); end + + # This method waits until `AndroidWebView` matching the `selector` is opened and returns it. If there is already an open `AndroidWebView` matching the `selector`, returns immediately. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#186 + def web_view(selector); end + + # Currently open WebViews. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#192 + def web_views; end + + private + + # source://playwright-ruby-client//lib/playwright_api/android_device.rb#224 + def event_emitter_proxy; end +end + +# source://playwright-ruby-client//lib/playwright.rb#54 +class Playwright::AndroidExecution + # @return [AndroidExecution] a new instance of AndroidExecution + # + # source://playwright-ruby-client//lib/playwright.rb#55 + def initialize(connection, playwright, device = T.unsafe(nil)); end + + # Returns the value of attribute device. + # + # source://playwright-ruby-client//lib/playwright.rb#66 + def device; end + + # Returns the value of attribute playwright. + # + # source://playwright-ruby-client//lib/playwright.rb#66 + def playwright; end + + # source://playwright-ruby-client//lib/playwright.rb#61 + def stop; end +end + +# source://playwright-ruby-client//lib/playwright_api/android_input.rb#2 +class Playwright::AndroidInput < ::Playwright::PlaywrightApi + # Performs a drag between `from` and `to` points. + # + # source://playwright-ruby-client//lib/playwright_api/android_input.rb#6 + def drag(from, to, steps); end + + # Presses the `key`. + # + # source://playwright-ruby-client//lib/playwright_api/android_input.rb#12 + def press(key); end + + # Swipes following the path defined by `segments`. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_input.rb#18 + def swipe(from, segments, steps); end + + # Taps at the specified `point`. + # + # source://playwright-ruby-client//lib/playwright_api/android_input.rb#24 + def tap_point(point); end + + # Types `text` into currently focused widget. + # + # source://playwright-ruby-client//lib/playwright_api/android_input.rb#30 + def type(text); end +end + +# source://playwright-ruby-client//lib/playwright/android_input_impl.rb#0 +class Playwright::AndroidInputImpl + include ::Playwright::ApiImplementation + + # source://playwright-ruby-client//lib/playwright/android_input_impl.rb#3 + def initialize(channel); end + + # source://playwright-ruby-client//lib/playwright/android_input_impl.rb#19 + def drag(from, to, steps); end + + # source://playwright-ruby-client//lib/playwright/android_input_impl.rb#11 + def press(key); end + + # source://playwright-ruby-client//lib/playwright/android_input_impl.rb#15 + def tap_point(point); end + + # source://playwright-ruby-client//lib/playwright/android_input_impl.rb#7 + def type(text); end +end + +# `AndroidSocket` is a way to communicate with a process launched on the `AndroidDevice`. Use [`method: AndroidDevice.open`] to open a socket. +# +# source://playwright-ruby-client//lib/playwright_api/android_socket.rb#4 +class Playwright::AndroidSocket < ::Playwright::PlaywrightApi + # Closes the socket. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_socket.rb#8 + def close; end + + # Writes some `data` to the socket. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_socket.rb#14 + def write(data); end +end + +# `AndroidWebView` represents a WebView open on the `AndroidDevice`. WebView is usually obtained using [`method: AndroidDevice.webView`]. +# +# source://playwright-ruby-client//lib/playwright_api/android_web_view.rb#4 +class Playwright::AndroidWebView < ::Playwright::PlaywrightApi + # Connects to the WebView and returns a regular Playwright `Page` to interact with. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_web_view.rb#8 + def page; end + + # WebView process PID. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_web_view.rb#14 + def pid; end + + # WebView package identifier. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/android_web_view.rb#20 + def pkg; end +end + +# Each Impl class include this module. +# Used for detecting whether the object is a XXXXImpl or not. +# +# source://playwright-ruby-client//lib/playwright/api_implementation.rb#4 +module Playwright::ApiImplementation; end + +# source://playwright-ruby-client//lib/playwright/errors.rb#71 +class Playwright::AssertionError < ::StandardError; end + +# - extends: [EventEmitter] +# +# A Browser is created via [`method: BrowserType.launch`]. An example of using a `Browser` to create a `Page`: +# +# ```python sync +# from playwright.sync_api import sync_playwright, Playwright +# +# def run(playwright: Playwright): +# firefox = playwright.firefox +# browser = firefox.launch() +# page = browser.new_page() +# page.goto("https://example.com") +# browser.close() +# +# with sync_playwright() as playwright: +# run(playwright) +# ``` +# +# source://playwright-ruby-client//lib/playwright_api/browser.rb#19 +class Playwright::Browser < ::Playwright::PlaywrightApi + # Get the browser type (chromium, firefox or webkit) that the browser belongs to. + # + # source://playwright-ruby-client//lib/playwright_api/browser.rb#23 + def browser_type; end + + # In case this browser is obtained using [`method: BrowserType.launch`], closes the browser and all of its pages (if any + # were opened). + # + # In case this browser is connected to, clears all created contexts belonging to this browser and disconnects from the + # browser server. + # + # **NOTE**: This is similar to force quitting the browser. Therefore, you should call [`method: BrowserContext.close`] on any `BrowserContext`'s you explicitly created earlier with [`method: Browser.newContext`] **before** calling [`method: Browser.close`]. + # + # The `Browser` object itself is considered to be disposed and cannot be used anymore. + # + # source://playwright-ruby-client//lib/playwright_api/browser.rb#37 + def close(reason: T.unsafe(nil)); end + + # Indicates that the browser is connected. + # + # @return [Boolean] + # + # source://playwright-ruby-client//lib/playwright_api/browser.rb#58 + def connected?; end + + # Returns an array of all open browser contexts. In a newly created browser, this will return zero browser contexts. + # + # **Usage** + # + # ```python sync + # browser = pw.webkit.launch() + # print(len(browser.contexts())) # prints `0` + # context = browser.new_context() + # print(len(browser.contexts())) # prints `1` + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/browser.rb#52 + def contexts; end + + # **NOTE**: CDP Sessions are only supported on Chromium-based browsers. + # + # Returns the newly created browser session. + # + # source://playwright-ruby-client//lib/playwright_api/browser.rb#66 + def new_browser_cdp_session; end + + # Creates a new browser context. It won't share cookies/cache with other browser contexts. + # + # **NOTE**: If directly using this method to create `BrowserContext`s, it is best practice to explicitly close the returned context via [`method: BrowserContext.close`] when your code is done with the `BrowserContext`, + # and before calling [`method: Browser.close`]. This will ensure the `context` is closed gracefully and any artifacts—like HARs and videos—are fully flushed and saved. + # + # **Usage** + # + # ```python sync + # browser = playwright.firefox.launch() # or "chromium" or "webkit". + # # create a new incognito browser context. + # context = browser.new_context() + # # create a new page in a pristine context. + # page = context.new_page() + # page.goto("https://example.com") + # + # # gracefully close up everything + # context.close() + # browser.close() + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/browser.rb#90 + def new_context(acceptDownloads: T.unsafe(nil), baseURL: T.unsafe(nil), bypassCSP: T.unsafe(nil), colorScheme: T.unsafe(nil), deviceScaleFactor: T.unsafe(nil), extraHTTPHeaders: T.unsafe(nil), forcedColors: T.unsafe(nil), geolocation: T.unsafe(nil), hasTouch: T.unsafe(nil), httpCredentials: T.unsafe(nil), ignoreHTTPSErrors: T.unsafe(nil), isMobile: T.unsafe(nil), javaScriptEnabled: T.unsafe(nil), locale: T.unsafe(nil), noViewport: T.unsafe(nil), offline: T.unsafe(nil), permissions: T.unsafe(nil), proxy: T.unsafe(nil), record_har_content: T.unsafe(nil), record_har_mode: T.unsafe(nil), record_har_omit_content: T.unsafe(nil), record_har_path: T.unsafe(nil), record_har_url_filter: T.unsafe(nil), record_video_dir: T.unsafe(nil), record_video_size: T.unsafe(nil), reducedMotion: T.unsafe(nil), screen: T.unsafe(nil), serviceWorkers: T.unsafe(nil), storageState: T.unsafe(nil), strictSelectors: T.unsafe(nil), timezoneId: T.unsafe(nil), userAgent: T.unsafe(nil), viewport: T.unsafe(nil), &block); end + + # Creates a new page in a new browser context. Closing this page will close the context as well. + # + # This is a convenience API that should only be used for the single-page scenarios and short snippets. Production code and + # testing frameworks should explicitly create [`method: Browser.newContext`] followed by the + # [`method: BrowserContext.newPage`] to control their exact life times. + # + # source://playwright-ruby-client//lib/playwright_api/browser.rb#134 + def new_page(acceptDownloads: T.unsafe(nil), baseURL: T.unsafe(nil), bypassCSP: T.unsafe(nil), colorScheme: T.unsafe(nil), deviceScaleFactor: T.unsafe(nil), extraHTTPHeaders: T.unsafe(nil), forcedColors: T.unsafe(nil), geolocation: T.unsafe(nil), hasTouch: T.unsafe(nil), httpCredentials: T.unsafe(nil), ignoreHTTPSErrors: T.unsafe(nil), isMobile: T.unsafe(nil), javaScriptEnabled: T.unsafe(nil), locale: T.unsafe(nil), noViewport: T.unsafe(nil), offline: T.unsafe(nil), permissions: T.unsafe(nil), proxy: T.unsafe(nil), record_har_content: T.unsafe(nil), record_har_mode: T.unsafe(nil), record_har_omit_content: T.unsafe(nil), record_har_path: T.unsafe(nil), record_har_url_filter: T.unsafe(nil), record_video_dir: T.unsafe(nil), record_video_size: T.unsafe(nil), reducedMotion: T.unsafe(nil), screen: T.unsafe(nil), serviceWorkers: T.unsafe(nil), storageState: T.unsafe(nil), strictSelectors: T.unsafe(nil), timezoneId: T.unsafe(nil), userAgent: T.unsafe(nil), viewport: T.unsafe(nil), &block); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/browser.rb#205 + def off(event, callback); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/browser.rb#217 + def on(event, callback); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/browser.rb#211 + def once(event, callback); end + + # **NOTE**: This API controls [Chromium Tracing](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) which is a low-level chromium-specific debugging tool. API to control [Playwright Tracing](../trace-viewer) could be found [here](./class-tracing). + # + # You can use [`method: Browser.startTracing`] and [`method: Browser.stopTracing`] to create a trace file that can + # be opened in Chrome DevTools performance panel. + # + # **Usage** + # + # ```python sync + # browser.start_tracing(page, path="trace.json") + # page.goto("https://www.google.com") + # browser.stop_tracing() + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/browser.rb#185 + def start_tracing(page: T.unsafe(nil), categories: T.unsafe(nil), path: T.unsafe(nil), screenshots: T.unsafe(nil)); end + + # **NOTE**: This API controls [Chromium Tracing](https://www.chromium.org/developers/how-tos/trace-event-profiling-tool) which is a low-level chromium-specific debugging tool. API to control [Playwright Tracing](../trace-viewer) could be found [here](./class-tracing). + # + # Returns the buffer with trace data. + # + # source://playwright-ruby-client//lib/playwright_api/browser.rb#193 + def stop_tracing; end + + # Returns the browser version. + # + # source://playwright-ruby-client//lib/playwright_api/browser.rb#199 + def version; end + + private + + # source://playwright-ruby-client//lib/playwright_api/browser.rb#221 + def event_emitter_proxy; end +end + +# - extends: [EventEmitter] +# +# BrowserContexts provide a way to operate multiple independent browser sessions. +# +# If a page opens another page, e.g. with a `window.open` call, the popup will belong to the parent page's browser +# context. +# +# Playwright allows creating "incognito" browser contexts with [`method: Browser.newContext`] method. "Incognito" browser +# contexts don't write any browsing data to disk. +# +# ```python sync +# # create a new incognito browser context +# context = browser.new_context() +# # create a new page inside context. +# page = context.new_page() +# page.goto("https://example.com") +# # dispose context once it is no longer needed. +# context.close() +# ``` +# +# source://playwright-ruby-client//lib/playwright_api/browser_context.rb#21 +class Playwright::BrowserContext < ::Playwright::PlaywrightApi + # Adds cookies into this browser context. All pages within this context will have these cookies installed. Cookies can be + # obtained via [`method: BrowserContext.cookies`]. + # + # **Usage** + # + # ```python sync + # browser_context.add_cookies([cookie_object1, cookie_object2]) + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#42 + def add_cookies(cookies); end + + # Adds a script which would be evaluated in one of the following scenarios: + # - Whenever a page is created in the browser context or is navigated. + # - Whenever a child frame is attached or navigated in any page in the browser context. In this case, the script is evaluated in the context of the newly attached frame. + # + # The script is evaluated after the document was created but before any of its scripts were run. This is useful to amend + # the JavaScript environment, e.g. to seed `Math.random`. + # + # **Usage** + # + # An example of overriding `Math.random` before the page loads: + # + # ```python sync + # # in your playwright script, assuming the preload.js file is in same directory. + # browser_context.add_init_script(path="preload.js") + # ``` + # + # **NOTE**: The order of evaluation of multiple scripts installed via [`method: BrowserContext.addInitScript`] and + # [`method: Page.addInitScript`] is not defined. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#65 + def add_init_script(path: T.unsafe(nil), script: T.unsafe(nil)); end + + # **NOTE**: Background pages are only supported on Chromium-based browsers. + # + # All existing background pages in the context. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#73 + def background_pages; end + + # Returns the browser instance of the context. If it was launched as a persistent context null gets returned. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#79 + def browser; end + + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#456 + def browser=(req); end + + # Clears context cookies. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#85 + def clear_cookies; end + + # Clears all permission overrides for the browser context. + # + # **Usage** + # + # ```python sync + # context = browser.new_context() + # context.grant_permissions(["clipboard-read"]) + # # do stuff .. + # context.clear_permissions() + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#100 + def clear_permissions; end + + # Closes the browser context. All the pages that belong to the browser context will be closed. + # + # **NOTE**: The default browser context cannot be closed. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#108 + def close(reason: T.unsafe(nil)); end + + # If no URLs are specified, this method returns all cookies. If URLs are specified, only cookies that affect those URLs + # are returned. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#115 + def cookies(urls: T.unsafe(nil)); end + + # This setting will change the default maximum navigation time for the following methods and related shortcuts: + # - [`method: Page.goBack`] + # - [`method: Page.goForward`] + # - [`method: Page.goto`] + # - [`method: Page.reload`] + # - [`method: Page.setContent`] + # - [`method: Page.waitForNavigation`] + # + # **NOTE**: [`method: Page.setDefaultNavigationTimeout`] and [`method: Page.setDefaultTimeout`] take priority over + # [`method: BrowserContext.setDefaultNavigationTimeout`]. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#334 + def default_navigation_timeout=(timeout); end + + # This setting will change the default maximum time for all the methods accepting `timeout` option. + # + # **NOTE**: [`method: Page.setDefaultNavigationTimeout`], [`method: Page.setDefaultTimeout`] and + # [`method: BrowserContext.setDefaultNavigationTimeout`] take priority over [`method: BrowserContext.setDefaultTimeout`]. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#344 + def default_timeout=(timeout); end + + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#451 + def enable_debug_console!; end + + # Performs action and waits for a `ConsoleMessage` to be logged by in the pages in the context. If predicate is provided, it passes + # `ConsoleMessage` value into the `predicate` function and waits for `predicate(message)` to return a truthy value. + # Will throw an error if the page is closed before the [`event: BrowserContext.console`] event is fired. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#398 + def expect_console_message(predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # Waits for event to fire and passes its value into the predicate function. Returns when the predicate returns truthy + # value. Will throw an error if the context closes before the event is fired. Returns the event data value. + # + # **Usage** + # + # ```python sync + # with context.expect_event("page") as event_info: + # page.get_by_role("button").click() + # page = event_info.value + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#413 + def expect_event(event, predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # Performs action and waits for a new `Page` to be created in the context. If predicate is provided, it passes + # `Page` value into the `predicate` function and waits for `predicate(event)` to return a truthy value. + # Will throw an error if the context closes before new `Page` is created. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#421 + def expect_page(predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # The method adds a function called `name` on the `window` object of every frame in every page in the context. + # When called, the function executes `callback` and returns a [Promise] which resolves to the return value of + # `callback`. If the `callback` returns a [Promise], it will be awaited. + # + # The first argument of the `callback` function contains information about the caller: `{ browserContext: + # BrowserContext, page: Page, frame: Frame }`. + # + # See [`method: Page.exposeBinding`] for page-only version. + # + # **Usage** + # + # An example of exposing page URL to all frames in all pages in the context: + # + # ```python sync + # from playwright.sync_api import sync_playwright, Playwright + # + # def run(playwright: Playwright): + # webkit = playwright.webkit + # browser = webkit.launch(headless=False) + # context = browser.new_context() + # context.expose_binding("pageURL", lambda source: source["page"].url) + # page = context.new_page() + # page.set_content(""" + # + # + #
+ # """) + # page.get_by_role("button").click() + # + # with sync_playwright() as playwright: + # run(playwright) + # ``` + # + # An example of passing an element handle: + # + # ```python sync + # def print(source, element): + # print(element.text_content()) + # + # context.expose_binding("clicked", print, handle=true) + # page.set_content(""" + # + #
Click me
+ #
Or click me
+ # """) + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#172 + def expose_binding(name, callback, handle: T.unsafe(nil)); end + + # The method adds a function called `name` on the `window` object of every frame in every page in the context. + # When called, the function executes `callback` and returns a [Promise] which resolves to the return value of + # `callback`. + # + # If the `callback` returns a [Promise], it will be awaited. + # + # See [`method: Page.exposeFunction`] for page-only version. + # + # **Usage** + # + # An example of adding a `sha256` function to all pages in the context: + # + # ```python sync + # import hashlib + # from playwright.sync_api import sync_playwright + # + # def sha256(text: str) -> str: + # m = hashlib.sha256() + # m.update(bytes(text, "utf8")) + # return m.hexdigest() + # + # + # def run(playwright: Playwright): + # webkit = playwright.webkit + # browser = webkit.launch(headless=False) + # context = browser.new_context() + # context.expose_function("sha256", sha256) + # page = context.new_page() + # page.set_content(""" + # + # + #
+ # """) + # page.get_by_role("button").click() + # + # with sync_playwright() as playwright: + # run(playwright) + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#219 + def expose_function(name, callback); end + + # The extra HTTP headers will be sent with every request initiated by any page in the context. These headers are merged + # with page-specific extra HTTP headers set with [`method: Page.setExtraHTTPHeaders`]. If page overrides a particular + # header, page-specific header value will be used instead of the browser context header value. + # + # **NOTE**: [`method: BrowserContext.setExtraHTTPHeaders`] does not guarantee the order of headers in the outgoing requests. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#355 + def extra_http_headers=(headers); end + + # Sets the context's geolocation. Passing `null` or `undefined` emulates position unavailable. + # + # **Usage** + # + # ```python sync + # browser_context.set_geolocation({"latitude": 59.95, "longitude": 30.31667}) + # ``` + # + # **NOTE**: Consider using [`method: BrowserContext.grantPermissions`] to grant permissions for the browser context pages to read + # its geolocation. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#371 + def geolocation=(geolocation); end + + # Grants specified permissions to the browser context. Only grants corresponding permissions to the given origin if + # specified. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#226 + def grant_permissions(permissions, origin: T.unsafe(nil)); end + + # **NOTE**: CDP sessions are only supported on Chromium-based browsers. + # + # Returns the newly created session. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#234 + def new_cdp_session(page); end + + # Creates a new page in the browser context. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#240 + def new_page(&block); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#462 + def off(event, callback); end + + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#376 + def offline=(offline); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#474 + def on(event, callback); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#468 + def once(event, callback); end + + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#441 + def options=(req); end + + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#446 + def owner_page=(req); end + + # Returns all open pages in the context. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#246 + def pages; end + + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#436 + def pause; end + + # API testing helper associated with this context. Requests made with this API will use context cookies. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#25 + def request; end + + # Routing provides the capability to modify network requests that are made by any page in the browser context. Once route + # is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or aborted. + # + # **NOTE**: [`method: BrowserContext.route`] will not intercept requests intercepted by Service Worker. See [this](https://github.com/microsoft/playwright/issues/1090) issue. We recommend disabling Service Workers when using request interception by setting `Browser.newContext.serviceWorkers` to `'block'`. + # + # **Usage** + # + # An example of a naive handler that aborts all image requests: + # + # ```python sync + # context = browser.new_context() + # page = context.new_page() + # context.route("**/*.{png,jpg,jpeg}", lambda route: route.abort()) + # page.goto("https://example.com") + # browser.close() + # ``` + # + # or the same snippet using a regex pattern instead: + # + # ```python sync + # context = browser.new_context() + # page = context.new_page() + # context.route(re.compile(r"(\.png$)|(\.jpg$)"), lambda route: route.abort()) + # page = await context.new_page() + # page = context.new_page() + # page.goto("https://example.com") + # browser.close() + # ``` + # + # It is possible to examine the request to decide the route action. For example, mocking all requests that contain some post data, and leaving all other requests as is: + # + # ```python sync + # def handle_route(route): + # if ("my-string" in route.request.post_data): + # route.fulfill(body="mocked-data") + # else: + # route.continue_() + # context.route("/api/**", handle_route) + # ``` + # + # Page routes (set up with [`method: Page.route`]) take precedence over browser context routes when request matches both + # handlers. + # + # To remove a route with its handler you can use [`method: BrowserContext.unroute`]. + # + # **NOTE**: Enabling routing disables http cache. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#297 + def route(url, handler, times: T.unsafe(nil)); end + + # If specified the network requests that are made in the context will be served from the HAR file. Read more about [Replaying from HAR](../mock.md#replaying-from-har). + # + # Playwright will not serve requests intercepted by Service Worker from the HAR file. See [this](https://github.com/microsoft/playwright/issues/1090) issue. We recommend disabling Service Workers when using request interception by setting `Browser.newContext.serviceWorkers` to `'block'`. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#305 + def route_from_har(har, notFound: T.unsafe(nil), update: T.unsafe(nil), updateContent: T.unsafe(nil), updateMode: T.unsafe(nil), url: T.unsafe(nil)); end + + # **NOTE**: Service workers are only supported on Chromium-based browsers. + # + # All existing service workers in the context. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#319 + def service_workers; end + + # This setting will change the default maximum navigation time for the following methods and related shortcuts: + # - [`method: Page.goBack`] + # - [`method: Page.goForward`] + # - [`method: Page.goto`] + # - [`method: Page.reload`] + # - [`method: Page.setContent`] + # - [`method: Page.waitForNavigation`] + # + # **NOTE**: [`method: Page.setDefaultNavigationTimeout`] and [`method: Page.setDefaultTimeout`] take priority over + # [`method: BrowserContext.setDefaultNavigationTimeout`]. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#334 + def set_default_navigation_timeout(timeout); end + + # This setting will change the default maximum time for all the methods accepting `timeout` option. + # + # **NOTE**: [`method: Page.setDefaultNavigationTimeout`], [`method: Page.setDefaultTimeout`] and + # [`method: BrowserContext.setDefaultNavigationTimeout`] take priority over [`method: BrowserContext.setDefaultTimeout`]. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#344 + def set_default_timeout(timeout); end + + # The extra HTTP headers will be sent with every request initiated by any page in the context. These headers are merged + # with page-specific extra HTTP headers set with [`method: Page.setExtraHTTPHeaders`]. If page overrides a particular + # header, page-specific header value will be used instead of the browser context header value. + # + # **NOTE**: [`method: BrowserContext.setExtraHTTPHeaders`] does not guarantee the order of headers in the outgoing requests. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#355 + def set_extra_http_headers(headers); end + + # Sets the context's geolocation. Passing `null` or `undefined` emulates position unavailable. + # + # **Usage** + # + # ```python sync + # browser_context.set_geolocation({"latitude": 59.95, "longitude": 30.31667}) + # ``` + # + # **NOTE**: Consider using [`method: BrowserContext.grantPermissions`] to grant permissions for the browser context pages to read + # its geolocation. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#371 + def set_geolocation(geolocation); end + + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#376 + def set_offline(offline); end + + # Returns storage state for this browser context, contains current cookies and local storage snapshot. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#383 + def storage_state(path: T.unsafe(nil)); end + + # property + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#29 + def tracing; end + + # Removes a route created with [`method: BrowserContext.route`]. When `handler` is not specified, removes all + # routes for the `url`. + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#390 + def unroute(url, handler: T.unsafe(nil)); end + + # **NOTE**: In most cases, you should use [`method: BrowserContext.waitForEvent`]. + # + # Waits for given `event` to fire. If predicate is provided, it passes + # event's value into the `predicate` function and waits for `predicate(event)` to return a truthy value. + # Will throw an error if the browser context is closed before the `event` is fired. + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#431 + def wait_for_event(event, predicate: T.unsafe(nil), timeout: T.unsafe(nil)); end + + private + + # source://playwright-ruby-client//lib/playwright_api/browser_context.rb#478 + def event_emitter_proxy; end +end + +# BrowserType provides methods to launch a specific browser instance or connect to an existing one. The following is a +# typical example of using Playwright to drive automation: +# +# ```python sync +# from playwright.sync_api import sync_playwright, Playwright +# +# def run(playwright: Playwright): +# chromium = playwright.chromium +# browser = chromium.launch() +# page = browser.new_page() +# page.goto("https://example.com") +# # other actions... +# browser.close() +# +# with sync_playwright() as playwright: +# run(playwright) +# ``` +# +# source://playwright-ruby-client//lib/playwright_api/browser_type.rb#20 +class Playwright::BrowserType < ::Playwright::PlaywrightApi + # This method attaches Playwright to an existing browser instance. When connecting to another browser launched via `BrowserType.launchServer` in Node.js, the major and minor version needs to match the client version (1.2.3 → is compatible with 1.2.x). + # + # @raise [NotImplementedError] + # + # source://playwright-ruby-client//lib/playwright_api/browser_type.rb#24 + def connect(wsEndpoint, exposeNetwork: T.unsafe(nil), headers: T.unsafe(nil), slowMo: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # This method attaches Playwright to an existing browser instance using the Chrome DevTools Protocol. + # + # The default browser context is accessible via [`method: Browser.contexts`]. + # + # **NOTE**: Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers. + # + # **Usage** + # + # ```python sync + # browser = playwright.chromium.connect_over_cdp("http://localhost:9222") + # default_context = browser.contexts[0] + # page = default_context.pages[0] + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/browser_type.rb#47 + def connect_over_cdp(endpointURL, headers: T.unsafe(nil), slowMo: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # A path where Playwright expects to find a bundled browser executable. + # + # source://playwright-ruby-client//lib/playwright_api/browser_type.rb#58 + def executable_path; end + + # Returns the browser instance. + # + # **Usage** + # + # You can use `ignoreDefaultArgs` to filter out `--mute-audio` from default arguments: + # + # ```python sync + # browser = playwright.chromium.launch( # or "firefox" or "webkit". + # ignore_default_args=["--mute-audio"] + # ) + # ``` + # + # > **Chromium-only** Playwright can also be used to control the Google Chrome or Microsoft Edge browsers, but it works best with the version of + # Chromium it is bundled with. There is no guarantee it will work with any other version. Use `executablePath` + # option with extreme caution. + # + # > + # + # > If Google Chrome (rather than Chromium) is preferred, a + # [Chrome Canary](https://www.google.com/chrome/browser/canary.html) or + # [Dev Channel](https://www.chromium.org/getting-involved/dev-channel) build is suggested. + # + # > + # + # > Stock browsers like Google Chrome and Microsoft Edge are suitable for tests that require proprietary media codecs for video playback. See [this article](https://www.howtogeek.com/202825/what%E2%80%99s-the-difference-between-chromium-and-chrome/) for other differences between Chromium and Chrome. + # [This article](https://chromium.googlesource.com/chromium/src/+/lkgr/docs/chromium_browser_vs_google_chrome.md) + # describes some differences for Linux users. + # + # source://playwright-ruby-client//lib/playwright_api/browser_type.rb#90 + def launch(args: T.unsafe(nil), channel: T.unsafe(nil), chromiumSandbox: T.unsafe(nil), devtools: T.unsafe(nil), downloadsPath: T.unsafe(nil), env: T.unsafe(nil), executablePath: T.unsafe(nil), firefoxUserPrefs: T.unsafe(nil), handleSIGHUP: T.unsafe(nil), handleSIGINT: T.unsafe(nil), handleSIGTERM: T.unsafe(nil), headless: T.unsafe(nil), ignoreDefaultArgs: T.unsafe(nil), proxy: T.unsafe(nil), slowMo: T.unsafe(nil), timeout: T.unsafe(nil), tracesDir: T.unsafe(nil), &block); end + + # Returns the persistent browser context instance. + # + # Launches browser that uses persistent storage located at `userDataDir` and returns the only context. Closing + # this context will automatically close the browser. + # + # source://playwright-ruby-client//lib/playwright_api/browser_type.rb#117 + def launch_persistent_context(userDataDir, acceptDownloads: T.unsafe(nil), args: T.unsafe(nil), baseURL: T.unsafe(nil), bypassCSP: T.unsafe(nil), channel: T.unsafe(nil), chromiumSandbox: T.unsafe(nil), colorScheme: T.unsafe(nil), deviceScaleFactor: T.unsafe(nil), devtools: T.unsafe(nil), downloadsPath: T.unsafe(nil), env: T.unsafe(nil), executablePath: T.unsafe(nil), extraHTTPHeaders: T.unsafe(nil), firefoxUserPrefs: T.unsafe(nil), forcedColors: T.unsafe(nil), geolocation: T.unsafe(nil), handleSIGHUP: T.unsafe(nil), handleSIGINT: T.unsafe(nil), handleSIGTERM: T.unsafe(nil), hasTouch: T.unsafe(nil), headless: T.unsafe(nil), httpCredentials: T.unsafe(nil), ignoreDefaultArgs: T.unsafe(nil), ignoreHTTPSErrors: T.unsafe(nil), isMobile: T.unsafe(nil), javaScriptEnabled: T.unsafe(nil), locale: T.unsafe(nil), noViewport: T.unsafe(nil), offline: T.unsafe(nil), permissions: T.unsafe(nil), proxy: T.unsafe(nil), record_har_content: T.unsafe(nil), record_har_mode: T.unsafe(nil), record_har_omit_content: T.unsafe(nil), record_har_path: T.unsafe(nil), record_har_url_filter: T.unsafe(nil), record_video_dir: T.unsafe(nil), record_video_size: T.unsafe(nil), reducedMotion: T.unsafe(nil), screen: T.unsafe(nil), serviceWorkers: T.unsafe(nil), slowMo: T.unsafe(nil), strictSelectors: T.unsafe(nil), timeout: T.unsafe(nil), timezoneId: T.unsafe(nil), tracesDir: T.unsafe(nil), userAgent: T.unsafe(nil), viewport: T.unsafe(nil), &block); end + + # Returns browser name. For example: `'chromium'`, `'webkit'` or `'firefox'`. + # + # source://playwright-ruby-client//lib/playwright_api/browser_type.rb#173 + def name; end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/browser_type.rb#179 + def off(event, callback); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/browser_type.rb#191 + def on(event, callback); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/browser_type.rb#185 + def once(event, callback); end + + private + + # source://playwright-ruby-client//lib/playwright_api/browser_type.rb#195 + def event_emitter_proxy; end +end + +# - extends: [EventEmitter] +# +# The `CDPSession` instances are used to talk raw Chrome Devtools Protocol: +# - protocol methods can be called with `session.send` method. +# - protocol events can be subscribed to with `session.on` method. +# +# Useful links: +# - Documentation on DevTools Protocol can be found here: [DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/). +# - Getting Started with DevTools Protocol: https://github.com/aslushnikov/getting-started-with-cdp/blob/master/README.md +# +# ```python sync +# client = page.context.new_cdp_session(page) +# client.send("Animation.enable") +# client.on("Animation.animationCreated", lambda: print("animation created!")) +# response = client.send("Animation.getPlaybackRate") +# print("playback rate is " + str(response["playbackRate"])) +# client.send("Animation.setPlaybackRate", { +# playbackRate: response["playbackRate"] / 2 +# }) +# ``` +# +# source://playwright-ruby-client//lib/playwright_api/cdp_session.rb#22 +class Playwright::CDPSession < ::Playwright::PlaywrightApi + # Detaches the CDPSession from the target. Once detached, the CDPSession object won't emit any events and can't be used to + # send messages. + # + # source://playwright-ruby-client//lib/playwright_api/cdp_session.rb#27 + def detach; end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/cdp_session.rb#37 + def off(event, callback); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/cdp_session.rb#49 + def on(event, callback); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/cdp_session.rb#43 + def once(event, callback); end + + # source://playwright-ruby-client//lib/playwright_api/cdp_session.rb#31 + def send_message(method, params: T.unsafe(nil)); end + + private + + # source://playwright-ruby-client//lib/playwright_api/cdp_session.rb#53 + def event_emitter_proxy; end +end + +# source://playwright-ruby-client//lib/playwright/version.rb#5 +Playwright::COMPATIBLE_PLAYWRIGHT_VERSION = T.let(T.unsafe(nil), String) + +# source://playwright-ruby-client//lib/playwright/channel.rb#2 +class Playwright::Channel + include ::Playwright::EventEmitter + + # @param connection [Playwright::Connection] + # @param guid [String] + # @param object [Playwright::ChannelOwner] + # @return [Channel] a new instance of Channel + # + # source://playwright-ruby-client//lib/playwright/channel.rb#8 + def initialize(connection, guid, object:); end + + # @param method [String] + # @param params [Hash] + # + # source://playwright-ruby-client//lib/playwright/channel.rb#42 + def async_send_message_to_server(method, params = T.unsafe(nil)); end + + # Returns the value of attribute guid. + # + # source://playwright-ruby-client//lib/playwright/channel.rb#14 + def guid; end + + # Returns the value of attribute object. + # + # source://playwright-ruby-client//lib/playwright/channel.rb#14 + def object; end + + # @param method [String] + # @param params [Hash] + # @return [Playwright::ChannelOwner|nil] + # + # source://playwright-ruby-client//lib/playwright/channel.rb#19 + def send_message_to_server(method, params = T.unsafe(nil)); end + + # @param method [String] + # @param params [Hash] + # @return [Hash] + # + # source://playwright-ruby-client//lib/playwright/channel.rb#32 + def send_message_to_server_result(method, params); end + + private + + # source://playwright-ruby-client//lib/playwright/channel.rb#70 + def build_metadata_payload_from(api_name, stacks); end + + # source://playwright-ruby-client//lib/playwright/channel.rb#80 + def check_not_collected; end + + # source://playwright-ruby-client//lib/playwright/channel.rb#49 + def with_logging(&block); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owner.rb#2 +class Playwright::ChannelOwner + include ::Playwright::EventEmitter + + # @param parent [Playwright::ChannelOwner|Playwright::Connection] + # @param type [String] + # @param guid [String] + # @param initializer [Hash] + # @return [ChannelOwner] a new instance of ChannelOwner + # + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#20 + def initialize(parent, type, guid, initializer); end + + # hidden field for caching API instance. + # + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#14 + def _api; end + + # hidden field for caching API instance. + # + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#14 + def _api=(_arg0); end + + # Returns the value of attribute channel. + # + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#44 + def channel; end + + # Suppress long long inspect log and avoid RSpec from hanging up... + # + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#109 + def inspect; end + + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#100 + def off(event, callback); end + + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#84 + def on(event, callback); end + + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#92 + def once(event, callback); end + + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#113 + def to_s; end + + # @return [Boolean] + # + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#53 + def was_collected?; end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#46 + def adopt!(child); end + + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#117 + def after_initialize; end + + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#130 + def delete_object_from_child(guid); end + + # used only from Connection. Not intended for public use. So keep private. + # + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#58 + def dispose!(reason: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#134 + def same_connection?(other); end + + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#68 + def set_event_to_subscription_mapping(event_to_subscription_mapping); end + + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#126 + def update_object_from_child(guid, child); end + + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#120 + def update_parent(new_parent); end + + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#72 + def update_subscription(event, enabled); end + + class << self + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#5 + def from(channel); end + + # source://playwright-ruby-client//lib/playwright/channel_owner.rb#9 + def from_nullable(channel); end + end +end + +# namespace declaration +# +# source://playwright-ruby-client//lib/playwright/channel_owner.rb#147 +module Playwright::ChannelOwners; end + +# source://playwright-ruby-client//lib/playwright/channel_owners/api_request_context.rb#0 +class Playwright::ChannelOwners::APIRequestContext < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/api_request_context.rb#13 + def delete(url, **options); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/api_request_context.rb#9 + def dispose; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/api_request_context.rb#43 + def fetch(urlOrRequest, data: T.unsafe(nil), failOnStatusCode: T.unsafe(nil), form: T.unsafe(nil), headers: T.unsafe(nil), ignoreHTTPSErrors: T.unsafe(nil), maxRedirects: T.unsafe(nil), method: T.unsafe(nil), multipart: T.unsafe(nil), params: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/api_request_context.rb#23 + def get(url, **options); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/api_request_context.rb#18 + def head(url, **options); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/api_request_context.rb#28 + def patch(url, **options); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/api_request_context.rb#38 + def post(url, **options); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/api_request_context.rb#33 + def put(url, **options); end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/api_request_context.rb#82 + def _inner_fetch(request, url, data: T.unsafe(nil), failOnStatusCode: T.unsafe(nil), form: T.unsafe(nil), headers: T.unsafe(nil), ignoreHTTPSErrors: T.unsafe(nil), maxRedirects: T.unsafe(nil), method: T.unsafe(nil), multipart: T.unsafe(nil), params: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/api_request_context.rb#5 + def after_initialize; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/api_request_context.rb#158 + def file_payload?(value); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/api_request_context.rb#163 + def file_payload_to_json(payload); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/api_request_context.rb#177 + def json_parsable?(data); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/api_request_context.rb#171 + def object_to_array(hash); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/android.rb#0 +class Playwright::ChannelOwners::Android < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/android.rb#7 + def devices(host: T.unsafe(nil), omitDriverInstall: T.unsafe(nil), port: T.unsafe(nil)); end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/android.rb#3 + def after_initialize; end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/android_device.rb#0 +class Playwright::ChannelOwners::AndroidDevice < ::Playwright::ChannelOwner + include ::Playwright::Utils::PrepareBrowserContextOptions + + # source://playwright-ruby-client//lib/playwright/channel_owners/android_device.rb#84 + def close; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/android_device.rb#69 + def info(selector); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/android_device.rb#14 + def input; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/android_device.rb#98 + def launch_browser(pkg: T.unsafe(nil), **options, &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/android_device.rb#20 + def model; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/android_device.rb#73 + def screenshot(path: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/android_device.rb#16 + def serial; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/android_device.rb#93 + def shell(command); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/android_device.rb#10 + def should_close_connection_on_close!; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/android_device.rb#60 + def tap_on(selector, duration: T.unsafe(nil), timeout: T.unsafe(nil)); end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/android_device.rb#5 + def after_initialize; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/android_device.rb#24 + def to_regex(value); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/android_device.rb#35 + def to_selector_channel(selector); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/artifact.rb#0 +class Playwright::ChannelOwners::Artifact < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/artifact.rb#9 + def absolute_path; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/artifact.rb#36 + def cancel; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/artifact.rb#32 + def delete; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/artifact.rb#28 + def failure; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/artifact.rb#11 + def path_after_finished; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/artifact.rb#23 + def read_into_buffer; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/artifact.rb#18 + def save_as(path); end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/artifact.rb#5 + def after_initialize; end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/binding_call.rb#0 +class Playwright::ChannelOwners::BindingCall < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/binding_call.rb#12 + def call(callback); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/binding_call.rb#7 + def call_async(callback); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/binding_call.rb#3 + def name; end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#0 +class Playwright::ChannelOwners::Browser < ::Playwright::ChannelOwner + include ::Playwright::Utils::Errors::TargetClosedErrorMethods + include ::Playwright::Utils::PrepareBrowserContextOptions + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#27 + def browser_type; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#70 + def close(reason: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#31 + def connected?; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#23 + def contexts; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#86 + def new_browser_cdp_session; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#35 + def new_context(**options, &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#51 + def new_page(**options, &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#91 + def start_tracing(page: T.unsafe(nil), categories: T.unsafe(nil), path: T.unsafe(nil), screenshots: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#102 + def stop_tracing; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#82 + def version; end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#121 + def add_context(context); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#9 + def after_initialize; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#19 + def close_reason; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#114 + def on_close(_ = T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#130 + def remove_context(context); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#125 + def should_close_connection_on_close!; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser.rb#66 + def update_browser_type(browser_type); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#0 +class Playwright::ChannelOwners::BrowserContext < ::Playwright::ChannelOwner + include ::Playwright::Utils::PrepareBrowserContextOptions + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#266 + def add_cookies(cookies); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#299 + def add_init_script(path: T.unsafe(nil), script: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#213 + def background_pages; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#6 + def browser; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#6 + def browser=(_arg0); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#270 + def clear_cookies; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#282 + def clear_permissions; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#406 + def close(reason: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#254 + def cookies(urls: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#436 + def enable_debug_console!; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#478 + def expect_console_message(predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#386 + def expect_event(event, predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#486 + def expect_page(predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#313 + def expose_binding(name, callback, handle: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#328 + def expose_function(name, callback); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#274 + def grant_permissions(permissions, origin: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#221 + def new_cdp_session(page); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#241 + def new_page(&block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#7 + def options=(_arg0); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#7 + def owner_page=(_arg0); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#236 + def pages; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#457 + def pause; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#8 + def request; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#332 + def route(url, handler, times: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#361 + def route_from_har(har, notFound: T.unsafe(nil), update: T.unsafe(nil), updateContent: T.unsafe(nil), updateMode: T.unsafe(nil), url: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#217 + def service_workers; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#226 + def set_default_navigation_timeout(timeout); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#231 + def set_default_timeout(timeout); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#290 + def set_extra_http_headers(headers); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#286 + def set_geolocation(geolocation); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#295 + def set_offline(offline); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#464 + def storage_state(path: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#8 + def tracing; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#338 + def unroute(url, handler: T.unsafe(nil)); end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#508 + def _timeout_settings; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#10 + def after_initialize; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#376 + def async_update_interception_patterns; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#516 + def base_url; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#523 + def create_temp_file(filepath); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#474 + def effective_close_reason; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#512 + def has_record_video_option?; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#417 + def inner_close; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#102 + def on_background_page(page); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#143 + def on_binding(binding_call); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#400 + def on_close; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#168 + def on_console_message(message); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#175 + def on_dialog(dialog); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#96 + def on_page(page); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#190 + def on_page_error(error, page); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#197 + def on_request(request, page); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#150 + def on_request_failed(request, response_end_timing, failure_text, page); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#157 + def on_request_finished(params); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#202 + def on_response(response, page); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#107 + def on_route(route); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#207 + def on_service_worker(worker); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#345 + def record_into_har(har, page, notFound:, url:, updateContent:, updateMode:); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#499 + def remove_background_page(page); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#495 + def remove_page(page); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#503 + def remove_service_worker(worker); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#381 + def update_interception_patterns; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#85 + def update_options(context_options:, browser_options:); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/browser_type.rb#0 +class Playwright::ChannelOwners::BrowserType < ::Playwright::ChannelOwner + include ::Playwright::Utils::PrepareBrowserContextOptions + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_type.rb#43 + def connect_over_cdp(endpointURL, headers: T.unsafe(nil), slowMo: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_type.rb#9 + def executable_path; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_type.rb#13 + def launch(options, &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_type.rb#26 + def launch_persistent_context(userDataDir, **options, &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_type.rb#5 + def name; end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_type.rb#77 + def did_create_context(context, context_options = T.unsafe(nil), browser_options = T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_type.rb#81 + def did_launch_browser(browser); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/cdp_session.rb#0 +class Playwright::ChannelOwners::CDPSession < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/cdp_session.rb#15 + def detach; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/cdp_session.rb#11 + def send_message(method, params: T.unsafe(nil)); end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/cdp_session.rb#3 + def after_initialize; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/cdp_session.rb#7 + def on_event(params); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/dialog.rb#0 +class Playwright::ChannelOwners::Dialog < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/dialog.rb#19 + def accept(promptText: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/dialog.rb#23 + def accept_async(promptText: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/dialog.rb#15 + def default_value; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/dialog.rb#28 + def dismiss; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/dialog.rb#11 + def message; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/dialog.rb#3 + def page; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/dialog.rb#7 + def type; end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/electron.rb#0 +class Playwright::ChannelOwners::Electron < ::Playwright::ChannelOwner; end + +# source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#5 +class Playwright::ChannelOwners::ElementHandle < ::Playwright::ChannelOwners::JSHandle + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#6 + def as_element; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#291 + def bounding_box; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#257 + def check(force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#36 + def checked?; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#99 + def click(button: T.unsafe(nil), clickCount: T.unsafe(nil), delay: T.unsafe(nil), force: T.unsafe(nil), modifiers: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#15 + def content_frame; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#126 + def dblclick(button: T.unsafe(nil), delay: T.unsafe(nil), force: T.unsafe(nil), modifiers: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#40 + def disabled?; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#60 + def dispatch_event(type, eventInit: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#44 + def editable?; end + + # @return [Boolean] + # + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#48 + def enabled?; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#344 + def eval_on_selector(selector, pageFunction, arg: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#348 + def eval_on_selector_all(selector, pageFunction, arg: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#190 + def fill(value, force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#227 + def focus; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#20 + def get_attribute(name); end + + # @return [Boolean] + # + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#52 + def hidden?; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#79 + def hover(force: T.unsafe(nil), modifiers: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#32 + def inner_html; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#28 + def inner_text; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#209 + def input_value(timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#10 + def owner_frame; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#245 + def press(key, delay: T.unsafe(nil), noWaitAfter: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#333 + def query_selector(selector); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#338 + def query_selector_all(selector); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#295 + def screenshot(animations: T.unsafe(nil), caret: T.unsafe(nil), mask: T.unsafe(nil), maskColor: T.unsafe(nil), omitBackground: T.unsafe(nil), path: T.unsafe(nil), quality: T.unsafe(nil), scale: T.unsafe(nil), timeout: T.unsafe(nil), type: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#70 + def scroll_into_view_if_needed(timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#151 + def select_option(element: T.unsafe(nil), index: T.unsafe(nil), value: T.unsafe(nil), label: T.unsafe(nil), force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#202 + def select_text(force: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#283 + def set_checked(checked, **options); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#214 + def set_input_files(files, noWaitAfter: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#169 + def tap_point(force: T.unsafe(nil), modifiers: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#24 + def text_content; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#233 + def type(text, delay: T.unsafe(nil), noWaitAfter: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#270 + def uncheck(force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # @return [Boolean] + # + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#56 + def visible?; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#352 + def wait_for_element_state(state, timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/element_handle.rb#359 + def wait_for_selector(selector, state: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil)); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/fetch_request.rb#5 +class Playwright::ChannelOwners::FetchRequest < ::Playwright::ChannelOwners::APIRequestContext; end + +# source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#0 +class Playwright::ChannelOwners::Frame < ::Playwright::ChannelOwner + include ::Playwright::LocatorUtils + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#289 + def add_script_tag(content: T.unsafe(nil), path: T.unsafe(nil), type: T.unsafe(nil), url: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#302 + def add_style_tag(content: T.unsafe(nil), path: T.unsafe(nil), url: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#600 + def check(selector, force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#206 + def checked?(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#281 + def child_frames; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#314 + def click(selector, button: T.unsafe(nil), clickCount: T.unsafe(nil), delay: T.unsafe(nil), force: T.unsafe(nil), modifiers: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#257 + def content; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#372 + def dblclick(selector, button: T.unsafe(nil), delay: T.unsafe(nil), force: T.unsafe(nil), modifiers: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#27 + def detached=(_arg0); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#285 + def detached?; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#211 + def disabled?(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#236 + def dispatch_event(selector, type, eventInit: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#345 + def drag_and_drop(source, target, force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), sourcePosition: T.unsafe(nil), strict: T.unsafe(nil), targetPosition: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#216 + def editable?(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#221 + def enabled?(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#249 + def eval_on_selector(selector, pageFunction, arg: T.unsafe(nil), strict: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#253 + def eval_on_selector_all(selector, pageFunction, arg: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#176 + def evaluate(pageFunction, arg: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#180 + def evaluate_handle(pageFunction, arg: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#95 + def expect_navigation(timeout: T.unsafe(nil), url: T.unsafe(nil), waitUntil: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#425 + def fill(selector, value, force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#465 + def focus(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#171 + def frame_element; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#461 + def frame_locator(selector); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#486 + def get_attribute(selector, name, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#63 + def goto(url, timeout: T.unsafe(nil), waitUntil: T.unsafe(nil), referer: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#226 + def hidden?(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#673 + def highlight(selector); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#496 + def hover(selector, force: T.unsafe(nil), modifiers: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#481 + def inner_html(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#476 + def inner_text(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#540 + def input_value(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#445 + def locator(selector, has: T.unsafe(nil), hasNot: T.unsafe(nil), hasNotText: T.unsafe(nil), hasText: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#273 + def name; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#26 + def page; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#26 + def parent_frame; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#579 + def press(selector, key, delay: T.unsafe(nil), noWaitAfter: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#184 + def query_selector(selector, strict: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#193 + def query_selector_all(selector); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#520 + def select_option(selector, element: T.unsafe(nil), index: T.unsafe(nil), value: T.unsafe(nil), label: T.unsafe(nil), force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#646 + def set_checked(selector, checked, **options); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#261 + def set_content(html, timeout: T.unsafe(nil), waitUntil: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#545 + def set_input_files(selector, files, noWaitAfter: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#401 + def tap_point(selector, force: T.unsafe(nil), modifiers: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#471 + def text_content(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#669 + def title; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#558 + def type(selector, text, delay: T.unsafe(nil), noWaitAfter: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#623 + def uncheck(selector, force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#277 + def url; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#231 + def visible?(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#660 + def wait_for_function(pageFunction, arg: T.unsafe(nil), polling: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#149 + def wait_for_load_state(state: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#199 + def wait_for_selector(selector, state: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#654 + def wait_for_timeout(timeout); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#140 + def wait_for_url(url, timeout: T.unsafe(nil), waitUntil: T.unsafe(nil)); end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#8 + def after_initialize; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#685 + def append_child_frame_from_child(frame); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#53 + def on_frame_navigated(event); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#29 + def on_load_state(add:, remove:); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#86 + def setup_navigation_waiter(wait_name:, timeout_value:); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#679 + def update_page_from_page(page); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/js_handle.rb#0 +class Playwright::ChannelOwners::JSHandle < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/js_handle.rb#34 + def as_element; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/js_handle.rb#38 + def dispose; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/js_handle.rb#16 + def evaluate(pageFunction, arg: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/js_handle.rb#20 + def evaluate_handle(pageFunction, arg: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/js_handle.rb#24 + def get_properties; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/js_handle.rb#29 + def get_property(name); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/js_handle.rb#42 + def json_value; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/js_handle.rb#8 + def to_s; end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/js_handle.rb#3 + def after_initialize; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/js_handle.rb#12 + def on_preview_updated(params); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/local_utils.rb#0 +class Playwright::ChannelOwners::LocalUtils < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/local_utils.rb#56 + def add_stack_to_tracing_no_reply(id, stack); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/local_utils.rb#36 + def async_har_close(har_id); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/local_utils.rb#3 + def devices; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/local_utils.rb#22 + def har_lookup(har_id:, url:, method:, headers:, is_navigation_request:, post_data: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/local_utils.rb#18 + def har_open(file); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/local_utils.rb#40 + def har_unzip(zip_file, har_file); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/local_utils.rb#52 + def trace_discarded(stacks_id); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/local_utils.rb#44 + def tracing_started(traces_dir, trace_name); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/local_utils.rb#10 + def zip(params); end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/local_utils.rb#61 + def parse_device_descriptor(descriptor); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#0 +class Playwright::ChannelOwners::Page < ::Playwright::ChannelOwner + include ::Playwright::Utils::Errors::TargetClosedErrorMethods + include ::Playwright::LocatorUtils + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#80 + def accessibility; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#397 + def add_init_script(path: T.unsafe(nil), script: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#294 + def add_script_tag(content: T.unsafe(nil), path: T.unsafe(nil), type: T.unsafe(nil), url: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#298 + def add_style_tag(content: T.unsafe(nil), path: T.unsafe(nil), url: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#392 + def bring_to_front; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#753 + def check(selector, force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#250 + def checked?(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#511 + def click(selector, button: T.unsafe(nil), clickCount: T.unsafe(nil), delay: T.unsafe(nil), force: T.unsafe(nil), modifiers: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#494 + def close(runBeforeUnload: T.unsafe(nil), reason: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#507 + def closed?; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#325 + def content; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#195 + def context; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#562 + def dblclick(selector, button: T.unsafe(nil), delay: T.unsafe(nil), force: T.unsafe(nil), modifiers: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#254 + def disabled?(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#274 + def dispatch_event(selector, type, eventInit: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#539 + def drag_and_drop(source, target, force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), sourcePosition: T.unsafe(nil), strict: T.unsafe(nil), targetPosition: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#258 + def editable?(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#366 + def emulate_media(colorScheme: T.unsafe(nil), forcedColors: T.unsafe(nil), media: T.unsafe(nil), reducedMotion: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#262 + def enabled?(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#286 + def eval_on_selector(selector, pageFunction, arg: T.unsafe(nil), strict: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#290 + def eval_on_selector_all(selector, pageFunction, arg: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#278 + def evaluate(pageFunction, arg: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#282 + def evaluate_handle(pageFunction, arg: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#924 + def expect_console_message(predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#928 + def expect_download(predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#905 + def expect_event(event, predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#932 + def expect_file_chooser(predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#936 + def expect_navigation(timeout: T.unsafe(nil), url: T.unsafe(nil), waitUntil: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#944 + def expect_popup(predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#948 + def expect_request(urlOrPredicate, timeout: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#963 + def expect_request_finished(predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#967 + def expect_response(urlOrPredicate, timeout: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#982 + def expect_websocket(predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#986 + def expect_worker(predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#307 + def expose_binding(name, callback, handle: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#302 + def expose_function(name, callback); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#608 + def fill(selector, value, force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#642 + def focus(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#213 + def frame(name: T.unsafe(nil), url: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#638 + def frame_locator(selector); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#224 + def frames; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#658 + def get_attribute(selector, name, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#354 + def go_back(timeout: T.unsafe(nil), waitUntil: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#360 + def go_forward(timeout: T.unsafe(nil), waitUntil: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#333 + def goto(url, timeout: T.unsafe(nil), waitUntil: T.unsafe(nil), referer: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#1012 + def guid; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#266 + def hidden?(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#662 + def hover(selector, force: T.unsafe(nil), modifiers: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#654 + def inner_html(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#650 + def inner_text(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#706 + def input_value(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#80 + def keyboard; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#624 + def locator(selector, has: T.unsafe(nil), hasNot: T.unsafe(nil), hasNotText: T.unsafe(nil), hasText: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#80 + def main_frame; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#80 + def mouse; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#199 + def opener; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#9 + def owned_context=(_arg0); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#815 + def pause; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#819 + def pdf(displayHeaderFooter: T.unsafe(nil), footerTemplate: T.unsafe(nil), format: T.unsafe(nil), headerTemplate: T.unsafe(nil), height: T.unsafe(nil), landscape: T.unsafe(nil), margin: T.unsafe(nil), pageRanges: T.unsafe(nil), path: T.unsafe(nil), preferCSSPageSize: T.unsafe(nil), printBackground: T.unsafe(nil), scale: T.unsafe(nil), width: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#736 + def press(selector, key, delay: T.unsafe(nil), noWaitAfter: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#238 + def query_selector(selector, strict: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#242 + def query_selector_all(selector); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#337 + def reload(timeout: T.unsafe(nil), waitUntil: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#811 + def request; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#411 + def route(url, handler, times: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#424 + def route_from_har(har, notFound: T.unsafe(nil), update: T.unsafe(nil), url: T.unsafe(nil), updateContent: T.unsafe(nil), updateMode: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#449 + def screenshot(animations: T.unsafe(nil), caret: T.unsafe(nil), clip: T.unsafe(nil), fullPage: T.unsafe(nil), mask: T.unsafe(nil), maskColor: T.unsafe(nil), omitBackground: T.unsafe(nil), path: T.unsafe(nil), quality: T.unsafe(nil), scale: T.unsafe(nil), timeout: T.unsafe(nil), type: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#683 + def select_option(selector, element: T.unsafe(nil), index: T.unsafe(nil), value: T.unsafe(nil), label: T.unsafe(nil), force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#791 + def set_checked(selector, checked, **options); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#329 + def set_content(html, timeout: T.unsafe(nil), waitUntil: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#228 + def set_default_navigation_timeout(timeout); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#233 + def set_default_timeout(timeout); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#316 + def set_extra_http_headers(headers); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#710 + def set_input_files(selector, files, noWaitAfter: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#386 + def set_viewport_size(viewportSize); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#876 + def start_css_coverage(resetOnNavigation: T.unsafe(nil), reportAnonymousScripts: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#863 + def start_js_coverage(resetOnNavigation: T.unsafe(nil), reportAnonymousScripts: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#884 + def stop_css_coverage; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#872 + def stop_js_coverage; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#587 + def tap_point(selector, force: T.unsafe(nil), modifiers: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#646 + def text_content(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#490 + def title; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#80 + def touchscreen; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#719 + def type(selector, text, delay: T.unsafe(nil), noWaitAfter: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#772 + def uncheck(selector, force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#417 + def unroute(url, handler: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#321 + def url; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#858 + def video; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#80 + def viewport_size; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#270 + def visible?(selector, strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#803 + def wait_for_function(pageFunction, arg: T.unsafe(nil), polling: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#346 + def wait_for_load_state(state: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#246 + def wait_for_selector(selector, state: T.unsafe(nil), strict: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#799 + def wait_for_timeout(timeout); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#350 + def wait_for_url(url, timeout: T.unsafe(nil), waitUntil: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#807 + def workers; end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#12 + def after_initialize; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#439 + def async_update_interception_patterns; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#900 + def close_error_with_reason; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#207 + def emit_popup_event_from_browser_context; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#996 + def has_bindings?(name); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#378 + def no_override_if_null(target); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#134 + def on_binding(binding_call); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#148 + def on_close; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#158 + def on_crash; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#165 + def on_download(params); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#88 + def on_frame_attached(frame); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#94 + def on_frame_detached(frame); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#100 + def on_route(route); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#176 + def on_video(params); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#142 + def on_worker(worker); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#182 + def perform_event_emitter_callback(event, callback, args); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#1006 + def remote_connection?; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#1001 + def remove_worker(worker); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#991 + def timeout_settings; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#444 + def update_interception_patterns; end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/playwright.rb#0 +class Playwright::ChannelOwners::Playwright < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/playwright.rb#15 + def android; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/playwright.rb#3 + def chromium; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/playwright.rb#27 + def devices; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/playwright.rb#19 + def electron; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/playwright.rb#7 + def firefox; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/playwright.rb#23 + def selectors; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/playwright.rb#11 + def webkit; end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/playwright.rb#39 + def pre_connected_android_device; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/playwright.rb#32 + def pre_launched_browser; end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#0 +class Playwright::ChannelOwners::Request < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#140 + def all_headers; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#29 + def apply_fallback_overrides(overrides); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#113 + def failure; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#101 + def frame; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#148 + def header_value(name); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#152 + def header_values(name); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#119 + def headers; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#144 + def headers_array; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#50 + def method; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#109 + def navigation_request?; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#54 + def post_data; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#72 + def post_data_buffer; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#58 + def post_data_json; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#117 + def redirected_from; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#117 + def redirected_to; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#46 + def resource_type; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#84 + def response; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#156 + def sizes; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#117 + def timing; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#38 + def url; end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#128 + def actual_headers; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#6 + def after_initialize; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#25 + def fallback_overrides; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#42 + def internal_url; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#136 + def raw_request_headers; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#169 + def update_failure_text(failure_text); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#165 + def update_redirected_to(request); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#193 + def update_response_end_timing(response_end_timing); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/request.rb#173 + def update_timings(start_time:, domain_lookup_start:, domain_lookup_end:, connect_start:, secure_connection_start:, connect_end:, request_start:, response_start:); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#0 +class Playwright::ChannelOwners::Response < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#61 + def all_headers; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#89 + def body; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#85 + def finished; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#99 + def frame; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#55 + def from_service_worker; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#55 + def from_service_worker?; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#69 + def header_value(name); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#73 + def header_values(name); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#42 + def headers; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#65 + def headers_array; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#95 + def json; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#29 + def ok; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#29 + def ok?; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#23 + def request; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#81 + def security_details; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#77 + def server_addr; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#34 + def status; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#38 + def status_text; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#89 + def text; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#25 + def url; end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#47 + def actual_headers; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#7 + def after_initialize; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#114 + def mark_as_finished; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#51 + def raw_response_headers; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/response.rb#103 + def sizes; end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/route.rb#0 +class Playwright::ChannelOwners::Route < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/route.rb#22 + def abort(errorCode: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/route.rb#126 + def continue(headers: T.unsafe(nil), method: T.unsafe(nil), postData: T.unsafe(nil), url: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/route.rb#100 + def fallback(headers: T.unsafe(nil), method: T.unsafe(nil), postData: T.unsafe(nil), url: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/route.rb#113 + def fetch(headers: T.unsafe(nil), method: T.unsafe(nil), postData: T.unsafe(nil), url: T.unsafe(nil), maxRedirects: T.unsafe(nil), timeout: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/route.rb#30 + def fulfill(body: T.unsafe(nil), contentType: T.unsafe(nil), headers: T.unsafe(nil), json: T.unsafe(nil), path: T.unsafe(nil), status: T.unsafe(nil), response: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/route.rb#164 + def redirect_navigation_request(url); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/route.rb#18 + def request; end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/route.rb#140 + def async_continue_route(internal: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/route.rb#10 + def handling_with_result(done, &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/route.rb#171 + def mime_type_for(filepath); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/route.rb#6 + def set_handling_future(future); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/route.rb#176 + def update_context(context); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/selectors.rb#0 +class Playwright::ChannelOwners::Selectors < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/selectors.rb#4 + def register(name, contentScript: T.unsafe(nil), path: T.unsafe(nil), script: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/selectors.rb#22 + def text_id_attribute=(attribute_name); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/stream.rb#0 +class Playwright::ChannelOwners::Stream < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/stream.rb#13 + def read_all(&block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/stream.rb#5 + def save_as(path); end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/stream.rb#21 + def read_with_block(&block); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/tracing.rb#0 +class Playwright::ChannelOwners::Tracing < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/tracing.rb#3 + def start(name: T.unsafe(nil), title: T.unsafe(nil), screenshots: T.unsafe(nil), snapshots: T.unsafe(nil), sources: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/tracing.rb#16 + def start_chunk(title: T.unsafe(nil), name: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/tracing.rb#33 + def stop(path: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/tracing.rb#29 + def stop_chunk(path: T.unsafe(nil)); end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/tracing.rb#38 + def do_stop_chunk(file_path:); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/tracing.rb#21 + def start_collecting_stacks(trace_name); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/tracing.rb#92 + def update_traces_dir(traces_dir); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/web_socket.rb#0 +class Playwright::ChannelOwners::WebSocket < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/web_socket.rb#73 + def closed?; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/web_socket.rb#36 + def expect_event(event, predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/web_socket.rb#20 + def url; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/web_socket.rb#36 + def wait_for_event(event, predicate: T.unsafe(nil), timeout: T.unsafe(nil), &block); end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/web_socket.rb#5 + def after_initialize; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/web_socket.rb#77 + def on_close; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/web_socket.rb#65 + def on_frame_received(opcode, data); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/web_socket.rb#57 + def on_frame_sent(opcode, data); end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/worker.rb#0 +class Playwright::ChannelOwners::Worker < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/worker.rb#3 + def context=(_arg0); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/worker.rb#19 + def evaluate(expression, arg: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/worker.rb#23 + def evaluate_handle(expression, arg: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/worker.rb#3 + def page=(_arg0); end + + # source://playwright-ruby-client//lib/playwright/channel_owners/worker.rb#15 + def url; end + + private + + # source://playwright-ruby-client//lib/playwright/channel_owners/worker.rb#5 + def after_initialize; end + + # source://playwright-ruby-client//lib/playwright/channel_owners/worker.rb#9 + def on_close; end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/writable_stream.rb#0 +class Playwright::ChannelOwners::WritableStream < ::Playwright::ChannelOwner + # source://playwright-ruby-client//lib/playwright/channel_owners/writable_stream.rb#6 + def write(readable, bufsize = T.unsafe(nil)); end +end + +# https://github.com/microsoft/playwright/blob/master/src/client/connection.ts +# https://github.com/microsoft/playwright-python/blob/master/playwright/_impl/_connection.py +# https://github.com/microsoft/playwright-java/blob/master/playwright/src/main/java/com/microsoft/playwright/impl/Connection.java +# +# source://playwright-ruby-client//lib/playwright/connection.rb#7 +class Playwright::Connection + # @return [Connection] a new instance of Connection + # + # source://playwright-ruby-client//lib/playwright/connection.rb#8 + def initialize(transport); end + + # source://playwright-ruby-client//lib/playwright/connection.rb#39 + def async_run; end + + # source://playwright-ruby-client//lib/playwright/connection.rb#72 + def async_send_message_to_server(guid, method, params, metadata: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/connection.rb#48 + def cleanup(cause: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/connection.rb#56 + def initialize_playwright; end + + # Returns the value of attribute local_utils. + # + # source://playwright-ruby-client//lib/playwright/connection.rb#29 + def local_utils; end + + # source://playwright-ruby-client//lib/playwright/connection.rb#31 + def mark_as_remote; end + + # @return [Boolean] + # + # source://playwright-ruby-client//lib/playwright/connection.rb#35 + def remote?; end + + # source://playwright-ruby-client//lib/playwright/connection.rb#115 + def send_message_to_server(guid, method, params, metadata: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright/connection.rb#64 + def set_in_tracing(value); end + + # source://playwright-ruby-client//lib/playwright/connection.rb#43 + def stop; end + + private + + # @return [Playwright::ChannelOwner|nil] + # + # source://playwright-ruby-client//lib/playwright/connection.rb#249 + def create_remote_object(parent_guid:, type:, guid:, initializer:); end + + # @note This method should be used internally. Accessed via .send method from Playwright::ChannelOwner, so keep private! + # @param guid [String] + # + # source://playwright-ruby-client//lib/playwright/connection.rb#140 + def delete_object_from_channel_owner(guid); end + + # source://playwright-ruby-client//lib/playwright/connection.rb#144 + def dispatch(msg); end + + # source://playwright-ruby-client//lib/playwright/connection.rb#207 + def replace_channels_with_guids(payload); end + + # source://playwright-ruby-client//lib/playwright/connection.rb#227 + def replace_guids_with_channels(payload); end + + # @note This method should be used internally. Accessed via .send method from Playwright::ChannelOwner, so keep private! + # @param guid [String] + # @param parent [Playwright::ChannelOwner] + # + # source://playwright-ruby-client//lib/playwright/connection.rb#134 + def update_object_from_channel_owner(guid, parent); end + + # ```usage + # connection.with_generated_id do |id| + # # play with id + # end + # ```` + # + # source://playwright-ruby-client//lib/playwright/connection.rb#126 + def with_generated_id(&block); end +end + +# `ConsoleMessage` objects are dispatched by page via the [`event: Page.console`] event. +# For each console messages logged in the page there will be corresponding event in the Playwright +# context. +# +# ```python sync +# # Listen for all console logs +# page.on("console", lambda msg: print(msg.text)) +# +# # Listen for all console events and handle errors +# page.on("console", lambda msg: print(f"error: {msg.text}") if msg.type == "error" else None) +# +# # Get the next console log +# with page.expect_console_message() as msg_info: +# # Issue console.log inside the page +# page.evaluate("console.log('hello', 42, { foo: 'bar' })") +# msg = msg_info.value +# +# # Deconstruct print arguments +# msg.args[0].json_value() # hello +# msg.args[1].json_value() # 42 +# ``` +# +# source://playwright-ruby-client//lib/playwright_api/console_message.rb#24 +class Playwright::ConsoleMessage < ::Playwright::PlaywrightApi + # List of arguments passed to a `console` function call. See also [`event: Page.console`]. + # + # source://playwright-ruby-client//lib/playwright_api/console_message.rb#28 + def args; end + + # source://playwright-ruby-client//lib/playwright_api/console_message.rb#32 + def location; end + + # The page that produced this console message, if any. + # + # source://playwright-ruby-client//lib/playwright_api/console_message.rb#38 + def page; end + + # The text of the console message. + # + # source://playwright-ruby-client//lib/playwright_api/console_message.rb#44 + def text; end + + # One of the following values: `'log'`, `'debug'`, `'info'`, `'error'`, `'warning'`, `'dir'`, `'dirxml'`, `'table'`, + # `'trace'`, `'clear'`, `'startGroup'`, `'startGroupCollapsed'`, `'endGroup'`, `'assert'`, `'profile'`, `'profileEnd'`, + # `'count'`, `'timeEnd'`. + # + # source://playwright-ruby-client//lib/playwright_api/console_message.rb#52 + def type; end +end + +# source://playwright-ruby-client//lib/playwright/console_message_impl.rb#0 +class Playwright::ConsoleMessageImpl + include ::Playwright::ApiImplementation + + # source://playwright-ruby-client//lib/playwright/console_message_impl.rb#3 + def initialize(event); end + + # source://playwright-ruby-client//lib/playwright/console_message_impl.rb#19 + def args; end + + # source://playwright-ruby-client//lib/playwright/console_message_impl.rb#25 + def location; end + + # source://playwright-ruby-client//lib/playwright/console_message_impl.rb#7 + def page; end + + # source://playwright-ruby-client//lib/playwright/console_message_impl.rb#15 + def text; end + + # source://playwright-ruby-client//lib/playwright/console_message_impl.rb#11 + def type; end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/frame.rb#74 +class Playwright::CrashedError < ::StandardError + # source://playwright-ruby-client//lib/playwright/channel_owners/page.rb#889 + def initialize; end +end + +# source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#451 +class Playwright::DebugConsoleNotEnabledError < ::StandardError + # source://playwright-ruby-client//lib/playwright/channel_owners/browser_context.rb#452 + def initialize; end +end + +# `Dialog` objects are dispatched by page via the [`event: Page.dialog`] event. +# +# An example of using `Dialog` class: +# +# ```python sync +# from playwright.sync_api import sync_playwright, Playwright +# +# def handle_dialog(dialog): +# print(dialog.message) +# dialog.dismiss() +# +# def run(playwright: Playwright): +# chromium = playwright.chromium +# browser = chromium.launch() +# page = browser.new_page() +# page.on("dialog", handle_dialog) +# page.evaluate("alert('1')") +# browser.close() +# +# with sync_playwright() as playwright: +# run(playwright) +# ``` +# +# **NOTE**: Dialogs are dismissed automatically, unless there is a [`event: Page.dialog`] listener. +# When listener is present, it **must** either [`method: Dialog.accept`] or [`method: Dialog.dismiss`] the dialog - otherwise the page will [freeze](https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop#never_blocking) waiting for the dialog, and actions like click will never finish. +# +# source://playwright-ruby-client//lib/playwright_api/dialog.rb#28 +class Playwright::Dialog < ::Playwright::PlaywrightApi + # Returns when the dialog has been accepted. + # + # source://playwright-ruby-client//lib/playwright_api/dialog.rb#32 + def accept(promptText: T.unsafe(nil)); end + + # source://playwright-ruby-client//lib/playwright_api/dialog.rb#67 + def accept_async(promptText: T.unsafe(nil)); end + + # If dialog is prompt, returns default prompt value. Otherwise, returns empty string. + # + # source://playwright-ruby-client//lib/playwright_api/dialog.rb#38 + def default_value; end + + # Returns when the dialog has been dismissed. + # + # source://playwright-ruby-client//lib/playwright_api/dialog.rb#44 + def dismiss; end + + # A message displayed in the dialog. + # + # source://playwright-ruby-client//lib/playwright_api/dialog.rb#50 + def message; end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/dialog.rb#73 + def off(event, callback); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/dialog.rb#85 + def on(event, callback); end + + # -- inherited from EventEmitter -- + # + # source://playwright-ruby-client//lib/playwright_api/dialog.rb#79 + def once(event, callback); end + + # The page that initiated this dialog, if available. + # + # source://playwright-ruby-client//lib/playwright_api/dialog.rb#56 + def page; end + + # Returns dialog's type, can be one of `alert`, `beforeunload`, `confirm` or `prompt`. + # + # source://playwright-ruby-client//lib/playwright_api/dialog.rb#62 + def type; end + + private + + # source://playwright-ruby-client//lib/playwright_api/dialog.rb#89 + def event_emitter_proxy; end +end + +# source://playwright-ruby-client//lib/playwright/locator_impl.rb#49 +class Playwright::DifferentFrameError < ::StandardError + # source://playwright-ruby-client//lib/playwright/locator_impl.rb#50 + def initialize(method_name); end +end + +# `Download` objects are dispatched by page via the [`event: Page.download`] event. +# +# All the downloaded files belonging to the browser context are deleted when the +# browser context is closed. +# +# Download event is emitted once the download starts. Download path becomes available once download completes. +# +# ```python sync +# # Start waiting for the download +# with page.expect_download() as download_info: +# # Perform the action that initiates download +# page.get_by_text("Download file").click() +# download = download_info.value +# +# # Wait for the download process to complete and save the downloaded file somewhere +# download.save_as("/path/to/save/at/" + download.suggested_filename) +# ``` +# +# source://playwright-ruby-client//lib/playwright_api/download.rb#20 +class Playwright::Download < ::Playwright::PlaywrightApi + # Cancels a download. Will not fail if the download is already finished or canceled. + # Upon successful cancellations, `download.failure()` would resolve to `'canceled'`. + # + # source://playwright-ruby-client//lib/playwright_api/download.rb#25 + def cancel; end + + # Deletes the downloaded file. Will wait for the download to finish if necessary. + # + # source://playwright-ruby-client//lib/playwright_api/download.rb#31 + def delete; end + + # Returns download error if any. Will wait for the download to finish if necessary. + # + # source://playwright-ruby-client//lib/playwright_api/download.rb#37 + def failure; end + + # Get the page that the download belongs to. + # + # source://playwright-ruby-client//lib/playwright_api/download.rb#43 + def page; end + + # Returns path to the downloaded file for a successful download, or throws for a failed/canceled download. The method will wait for the download to finish if necessary. The method throws when connected remotely. + # + # Note that the download's file name is a random GUID, use [`method: Download.suggestedFilename`] + # to get suggested file name. + # + # source://playwright-ruby-client//lib/playwright_api/download.rb#52 + def path; end + + # Copy the download to a user-specified path. It is safe to call this method while the download + # is still in progress. Will wait for the download to finish if necessary. + # + # **Usage** + # + # ```python sync + # download.save_as("/path/to/save/at/" + download.suggested_filename) + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/download.rb#65 + def save_as(path); end + + # Returns suggested filename for this download. It is typically computed by the browser from the + # [`Content-Disposition`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) response header + # or the `download` attribute. See the spec on [whatwg](https://html.spec.whatwg.org/#downloading-resources). Different + # browsers can use different logic for computing it. + # + # source://playwright-ruby-client//lib/playwright_api/download.rb#74 + def suggested_filename; end + + # Returns downloaded url. + # + # source://playwright-ruby-client//lib/playwright_api/download.rb#80 + def url; end +end + +# source://playwright-ruby-client//lib/playwright/download_impl.rb#0 +class Playwright::DownloadImpl + include ::Playwright::ApiImplementation + + # source://playwright-ruby-client//lib/playwright/download_impl.rb#3 + def initialize(page:, url:, suggested_filename:, artifact:); end + + # source://playwright-ruby-client//lib/playwright/download_impl.rb#28 + def cancel; end + + # source://playwright-ruby-client//lib/playwright/download_impl.rb#12 + def delete; end + + # source://playwright-ruby-client//lib/playwright/download_impl.rb#16 + def failure; end + + # source://playwright-ruby-client//lib/playwright/download_impl.rb#10 + def page; end + + # source://playwright-ruby-client//lib/playwright/download_impl.rb#20 + def path; end + + # source://playwright-ruby-client//lib/playwright/download_impl.rb#24 + def save_as(path); end + + # source://playwright-ruby-client//lib/playwright/download_impl.rb#10 + def suggested_filename; end + + # source://playwright-ruby-client//lib/playwright/download_impl.rb#10 + def url; end +end + +# source://playwright-ruby-client//lib/playwright/errors.rb#43 +class Playwright::DriverCrashedError < ::StandardError + # @return [DriverCrashedError] a new instance of DriverCrashedError + # + # source://playwright-ruby-client//lib/playwright/errors.rb#44 + def initialize; end +end + +# - extends: `JSHandle` +# +# ElementHandle represents an in-page DOM element. ElementHandles can be created with the [`method: Page.querySelector`] method. +# +# **NOTE**: The use of ElementHandle is discouraged, use `Locator` objects and web-first assertions instead. +# +# ```python sync +# href_element = page.query_selector("a") +# href_element.click() +# ``` +# +# ElementHandle prevents DOM element from garbage collection unless the handle is disposed with +# [`method: JSHandle.dispose`]. ElementHandles are auto-disposed when their origin frame gets navigated. +# +# ElementHandle instances can be used as an argument in [`method: Page.evalOnSelector`] and [`method: Page.evaluate`] methods. +# +# The difference between the `Locator` and ElementHandle is that the ElementHandle points to a particular element, while `Locator` captures the logic of how to retrieve an element. +# +# In the example below, handle points to a particular DOM element on page. If that element changes text or is used by React to render an entirely different component, handle is still pointing to that very DOM element. This can lead to unexpected behaviors. +# +# ```python sync +# handle = page.query_selector("text=Submit") +# handle.hover() +# handle.click() +# ``` +# +# With the locator, every time the `element` is used, up-to-date DOM element is located in the page using the selector. So in the snippet below, underlying DOM element is going to be located twice. +# +# ```python sync +# locator = page.get_by_text("Submit") +# locator.hover() +# locator.click() +# ``` +# +# source://playwright-ruby-client//lib/playwright_api/element_handle.rb#37 +class Playwright::ElementHandle < ::Playwright::JSHandle + # Returns element attribute value. + # + # source://playwright-ruby-client//lib/playwright_api/element_handle.rb#243 + def [](name); end + + # This method returns the bounding box of the element, or `null` if the element is not visible. The bounding box is + # calculated relative to the main frame viewport - which is usually the same as the browser window. + # + # Scrolling affects the returned bounding box, similarly to + # [Element.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect). That + # means `x` and/or `y` may be negative. + # + # Elements from child frames return the bounding box relative to the main frame, unlike the + # [Element.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect). + # + # Assuming the page is static, it is safe to use bounding box coordinates to perform input. For example, the following + # snippet should click the center of the element. + # + # **Usage** + # + # ```python sync + # box = element_handle.bounding_box() + # page.mouse.click(box["x"] + box["width"] / 2, box["y"] + box["height"] / 2) + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/element_handle.rb#59 + def bounding_box; end + + # This method checks the element by performing the following steps: + # 1. Ensure that element is a checkbox or a radio input. If not, this method throws. If the element is already checked, this method returns immediately. + # 1. Wait for [actionability](../actionability.md) checks on the element, unless `force` option is set. + # 1. Scroll the element into view if needed. + # 1. Use [`property: Page.mouse`] to click in the center of the element. + # 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. + # 1. Ensure that the element is now checked. If not, this method throws. + # + # If the element is detached from the DOM at any moment during the action, this method throws. + # + # When all steps combined have not finished during the specified `timeout`, this method throws a + # `TimeoutError`. Passing zero timeout disables this. + # + # source://playwright-ruby-client//lib/playwright_api/element_handle.rb#76 + def check(force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # This method checks or unchecks an element by performing the following steps: + # 1. Ensure that element is a checkbox or a radio input. If not, this method throws. + # 1. If the element already has the right checked state, this method returns immediately. + # 1. Wait for [actionability](../actionability.md) checks on the matched element, unless `force` option is set. If the element is detached during the checks, the whole action is retried. + # 1. Scroll the element into view if needed. + # 1. Use [`property: Page.mouse`] to click in the center of the element. + # 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. + # 1. Ensure that the element is now checked or unchecked. If not, this method throws. + # + # When all steps combined have not finished during the specified `timeout`, this method throws a + # `TimeoutError`. Passing zero timeout disables this. + # + # source://playwright-ruby-client//lib/playwright_api/element_handle.rb#452 + def checked=(checked, force: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # Returns whether the element is checked. Throws if the element is not a checkbox or radio input. + # + # @return [Boolean] + # + # source://playwright-ruby-client//lib/playwright_api/element_handle.rb#291 + def checked?; end + + # This method clicks the element by performing the following steps: + # 1. Wait for [actionability](../actionability.md) checks on the element, unless `force` option is set. + # 1. Scroll the element into view if needed. + # 1. Use [`property: Page.mouse`] to click in the center of the element, or the specified `position`. + # 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. + # + # If the element is detached from the DOM at any moment during the action, this method throws. + # + # When all steps combined have not finished during the specified `timeout`, this method throws a + # `TimeoutError`. Passing zero timeout disables this. + # + # source://playwright-ruby-client//lib/playwright_api/element_handle.rb#96 + def click(button: T.unsafe(nil), clickCount: T.unsafe(nil), delay: T.unsafe(nil), force: T.unsafe(nil), modifiers: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # Returns the content frame for element handles referencing iframe nodes, or `null` otherwise + # + # source://playwright-ruby-client//lib/playwright_api/element_handle.rb#111 + def content_frame; end + + # This method double clicks the element by performing the following steps: + # 1. Wait for [actionability](../actionability.md) checks on the element, unless `force` option is set. + # 1. Scroll the element into view if needed. + # 1. Use [`property: Page.mouse`] to double click in the center of the element, or the specified `position`. + # 1. Wait for initiated navigations to either succeed or fail, unless `noWaitAfter` option is set. Note that if the first click of the `dblclick()` triggers a navigation event, this method will throw. + # + # If the element is detached from the DOM at any moment during the action, this method throws. + # + # When all steps combined have not finished during the specified `timeout`, this method throws a + # `TimeoutError`. Passing zero timeout disables this. + # + # **NOTE**: `elementHandle.dblclick()` dispatches two `click` events and a single `dblclick` event. + # + # source://playwright-ruby-client//lib/playwright_api/element_handle.rb#128 + def dblclick(button: T.unsafe(nil), delay: T.unsafe(nil), force: T.unsafe(nil), modifiers: T.unsafe(nil), noWaitAfter: T.unsafe(nil), position: T.unsafe(nil), timeout: T.unsafe(nil), trial: T.unsafe(nil)); end + + # Returns whether the element is disabled, the opposite of [enabled](../actionability.md#enabled). + # + # @return [Boolean] + # + # source://playwright-ruby-client//lib/playwright_api/element_handle.rb#297 + def disabled?; end + + # The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element, `click` + # is dispatched. This is equivalent to calling + # [element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click). + # + # **Usage** + # + # ```python sync + # element_handle.dispatch_event("click") + # ``` + # + # Under the hood, it creates an instance of an event based on the given `type`, initializes it with + # `eventInit` properties and dispatches it on the element. Events are `composed`, `cancelable` and bubble by + # default. + # + # Since `eventInit` is event-specific, please refer to the events documentation for the lists of initial + # properties: + # - [DeviceMotionEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceMotionEvent/DeviceMotionEvent) + # - [DeviceOrientationEvent](https://developer.mozilla.org/en-US/docs/Web/API/DeviceOrientationEvent/DeviceOrientationEvent) + # - [DragEvent](https://developer.mozilla.org/en-US/docs/Web/API/DragEvent/DragEvent) + # - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event) + # - [FocusEvent](https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/FocusEvent) + # - [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/KeyboardEvent) + # - [MouseEvent](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent) + # - [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent) + # - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent) + # - [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent/WheelEvent) + # + # You can also specify `JSHandle` as the property value if you want live objects to be passed into the event: + # + # ```python sync + # # note you can only create data_transfer in chromium and firefox + # data_transfer = page.evaluate_handle("new DataTransfer()") + # element_handle.dispatch_event("#source", "dragstart", {"dataTransfer": data_transfer}) + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/element_handle.rb#175 + def dispatch_event(type, eventInit: T.unsafe(nil)); end + + # Returns whether the element is [editable](../actionability.md#editable). + # + # @return [Boolean] + # + # source://playwright-ruby-client//lib/playwright_api/element_handle.rb#303 + def editable?; end + + # Returns whether the element is [enabled](../actionability.md#enabled). + # + # @return [Boolean] + # + # source://playwright-ruby-client//lib/playwright_api/element_handle.rb#309 + def enabled?; end + + # Returns the return value of `expression`. + # + # The method finds an element matching the specified selector in the `ElementHandle`s subtree and passes it as a first + # argument to `expression`. If no elements match the selector, the method throws an error. + # + # If `expression` returns a [Promise], then [`method: ElementHandle.evalOnSelector`] would wait for the promise to resolve and return its + # value. + # + # **Usage** + # + # ```python sync + # tweet_handle = page.query_selector(".tweet") + # assert tweet_handle.eval_on_selector(".like", "node => node.innerText") == "100" + # assert tweet_handle.eval_on_selector(".retweets", "node => node.innerText") == "10" + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/element_handle.rb#195 + def eval_on_selector(selector, expression, arg: T.unsafe(nil)); end + + # Returns the return value of `expression`. + # + # The method finds all elements matching the specified selector in the `ElementHandle`'s subtree and passes an array of + # matched elements as a first argument to `expression`. + # + # If `expression` returns a [Promise], then [`method: ElementHandle.evalOnSelectorAll`] would wait for the promise to resolve and return its + # value. + # + # **Usage** + # + # ```html + #
+ #
Hello!
+ #
Hi!
+ #
+ # ``` + # + # ```python sync + # feed_handle = page.query_selector(".feed") + # assert feed_handle.eval_on_selector_all(".tweet", "nodes => nodes.map(n => n.innerText)") == ["hello!", "hi!"] + # ``` + # + # source://playwright-ruby-client//lib/playwright_api/element_handle.rb#221 + def eval_on_selector_all(selector, expression, arg: T.unsafe(nil)); end + + # This method waits for [actionability](../actionability.md) checks, focuses the element, fills it and triggers an `input` event after filling. Note that you can pass an empty string to clear the input field. + # + # If the target element is not an ``, `