Method: Playwright::Page#query_selector

Defined in:
lib/playwright_api/page.rb

#query_selector(selector) ⇒ Object

The method finds an element matching the specified selector within the page. If no elements match the selector, the return value resolves to null.

Shortcut for main frame’s [‘method: Frame.querySelector`].



1164
1165
1166
# File 'lib/playwright_api/page.rb', line 1164

def query_selector(selector)
  wrap_impl(@impl.query_selector(unwrap_impl(selector)))
end