GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • playwright-ruby-client
  • Docs
  • API
  • APIRequest
  • APIRequestContext
  • APIResponse
  • Browser
  • BrowserContext
  • BrowserType
  • CDPSession
  • Clock
  • ConsoleMessage
  • Credentials
  • Dialog

This view

  • Original page
  • New address

GeezerVison is showing playwright-ruby-client.vercel.app — Playwright | playwright-ruby-client

Playwright module provides a method to launch a browser instance. The following is a typical example of using Playwright to drive automation:

require 'playwright'

Playwright.create(playwright_cli_executable_path: './node_modules/.bin/playwright-core') do |playwright|
chromium = playwright.chromium # or "firefox" or "webkit".
chromium.launch do |browser|
page = browser.new_page
page.goto('https://example.com/')

# other actions

end
end

chromium​

This object can be used to launch or connect to Chromium, returning instances of Browser.

devices​

Returns a dictionary of devices to be used with Browser#new_context or Browser#new_page.

require 'playwright'

Playwright.create(playwright_cli_executable_path: './node_modules/.bin/playwright-core') do |playwright|
iphone = playwright.devices["iPhone 6"]
playwright.webkit.launch do |browser|
context = browser.new_context(**iphone)
page = context.new_page
page.goto('https://example.com/')

# other actions

end
end

firefox​

This object can be used to launch or connect to Firefox, returning instances of Browser.

request​

Exposes API that can be used for the Web API testing.

selectors​

Selectors can be used to install custom selector engines. See extensibility for more information.

webkit​

This object can be used to launch or connect to WebKit, returning instances of Browser.

  • chromium
  • devices
  • firefox
  • request
  • selectors
  • webkit
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.