Module: Playwright::LocatorUtils

Defined in:
lib/playwright/locator_utils.rb

Instance Method Summary collapse

Instance Method Details

#get_by_alt_text(text, exact: false) ⇒ Object



7
8
9
# File 'lib/playwright/locator_utils.rb', line 7

def get_by_alt_text(text, exact: false)
  locator(get_by_alt_text_selector(text, exact: exact))
end

#get_by_label(text, exact: false) ⇒ Object



11
12
13
# File 'lib/playwright/locator_utils.rb', line 11

def get_by_label(text, exact: false)
  locator(get_by_label_selector(text, exact: exact))
end

#get_by_placeholder(text, exact: false) ⇒ Object



15
16
17
# File 'lib/playwright/locator_utils.rb', line 15

def get_by_placeholder(text, exact: false)
  locator(get_by_placeholder_selector(text, exact: exact))
end

#get_by_role(role, **options) ⇒ Object



27
28
29
# File 'lib/playwright/locator_utils.rb', line 27

def get_by_role(role, **options)
  locator(get_by_role_selector(role, **(options.compact)))
end

#get_by_test_id(test_id) ⇒ Object



3
4
5
# File 'lib/playwright/locator_utils.rb', line 3

def get_by_test_id(test_id)
  locator(get_by_test_id_selector(test_id))
end

#get_by_text(text, exact: false) ⇒ Object



19
20
21
# File 'lib/playwright/locator_utils.rb', line 19

def get_by_text(text, exact: false)
  locator(get_by_text_selector(text, exact: exact))
end

#get_by_title(text, exact: false) ⇒ Object



23
24
25
# File 'lib/playwright/locator_utils.rb', line 23

def get_by_title(text, exact: false)
  locator(get_by_title_selector(text, exact: exact))
end