playwright-ruby-client 1.26.0 → 1.27.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/documentation/docs/api/api_request_context.md +86 -0
  3. data/documentation/docs/api/browser_context.md +3 -3
  4. data/documentation/docs/api/download.md +1 -1
  5. data/documentation/docs/api/element_handle.md +1 -1
  6. data/documentation/docs/api/file_chooser.md +1 -1
  7. data/documentation/docs/api/frame.md +103 -4
  8. data/documentation/docs/api/frame_locator.md +104 -4
  9. data/documentation/docs/api/locator.md +121 -6
  10. data/documentation/docs/api/page.md +118 -9
  11. data/documentation/docs/api/tracing.md +1 -1
  12. data/documentation/docs/article/guides/rails_integration_with_null_driver.md +59 -0
  13. data/documentation/docs/include/api_coverage.md +29 -0
  14. data/lib/playwright/channel_owners/frame.rb +4 -0
  15. data/lib/playwright/channel_owners/page.rb +2 -0
  16. data/lib/playwright/channel_owners/selectors.rb +4 -0
  17. data/lib/playwright/frame_locator_impl.rb +6 -2
  18. data/lib/playwright/locator_impl.rb +7 -31
  19. data/lib/playwright/locator_utils.rb +142 -0
  20. data/lib/playwright/version.rb +2 -2
  21. data/lib/playwright_api/api_request_context.rb +80 -2
  22. data/lib/playwright_api/browser_context.rb +3 -3
  23. data/lib/playwright_api/download.rb +1 -1
  24. data/lib/playwright_api/element_handle.rb +1 -1
  25. data/lib/playwright_api/file_chooser.rb +1 -1
  26. data/lib/playwright_api/frame.rb +78 -4
  27. data/lib/playwright_api/frame_locator.rb +78 -3
  28. data/lib/playwright_api/locator.rb +94 -5
  29. data/lib/playwright_api/page.rb +92 -9
  30. data/lib/playwright_api/request.rb +4 -4
  31. data/lib/playwright_api/response.rb +4 -4
  32. data/lib/playwright_api/selectors.rb +11 -0
  33. data/lib/playwright_api/tracing.rb +1 -1
  34. data/lib/playwright_api/worker.rb +4 -4
  35. metadata +4 -3
@@ -152,13 +152,13 @@ module Playwright
152
152
  end
153
153
 
154
154
  # @nodoc
155
- def apply_fallback_overrides(overrides)
156
- wrap_impl(@impl.apply_fallback_overrides(unwrap_impl(overrides)))
155
+ def header_values(name)
156
+ wrap_impl(@impl.header_values(unwrap_impl(name)))
157
157
  end
158
158
 
159
159
  # @nodoc
160
- def header_values(name)
161
- wrap_impl(@impl.header_values(unwrap_impl(name)))
160
+ def apply_fallback_overrides(overrides)
161
+ wrap_impl(@impl.apply_fallback_overrides(unwrap_impl(overrides)))
162
162
  end
163
163
 
164
164
  # -- inherited from EventEmitter --
@@ -101,13 +101,13 @@ module Playwright
101
101
  end
102
102
 
103
103
  # @nodoc
104
- def from_service_worker?
105
- wrap_impl(@impl.from_service_worker?)
104
+ def ok?
105
+ wrap_impl(@impl.ok?)
106
106
  end
107
107
 
108
108
  # @nodoc
109
- def ok?
110
- wrap_impl(@impl.ok?)
109
+ def from_service_worker?
110
+ wrap_impl(@impl.from_service_worker?)
111
111
  end
112
112
 
113
113
  # -- inherited from EventEmitter --
@@ -43,6 +43,17 @@ module Playwright
43
43
  wrap_impl(@impl.register(unwrap_impl(name), contentScript: unwrap_impl(contentScript), path: unwrap_impl(path), script: unwrap_impl(script)))
44
44
  end
45
45
 
46
+ # Defines custom attribute name to be used in [`method: Page.getByTestId`]. `data-testid` is used by default.
47
+ def set_test_id_attribute(attributeName)
48
+ raise NotImplementedError.new('set_test_id_attribute is not implemented yet.')
49
+ end
50
+ alias_method :test_id_attribute=, :set_test_id_attribute
51
+
52
+ # @nodoc
53
+ def text_id_attribute=(attribute_name)
54
+ wrap_impl(@impl.text_id_attribute=(unwrap_impl(attribute_name)))
55
+ end
56
+
46
57
  # -- inherited from EventEmitter --
47
58
  # @nodoc
48
59
  def off(event, callback)
@@ -41,7 +41,7 @@ module Playwright
41
41
  # page.goto("https://playwright.dev")
42
42
  #
43
43
  # context.tracing.start_chunk()
44
- # page.locator("text=Get Started").click()
44
+ # page.get_by_text("Get Started").click()
45
45
  # # Everything between start_chunk and stop_chunk will be recorded in the trace.
46
46
  # context.tracing.stop_chunk(path = "trace1.zip")
47
47
  #
@@ -44,13 +44,13 @@ module Playwright
44
44
  end
45
45
 
46
46
  # @nodoc
47
- def page=(req)
48
- wrap_impl(@impl.page=(unwrap_impl(req)))
47
+ def context=(req)
48
+ wrap_impl(@impl.context=(unwrap_impl(req)))
49
49
  end
50
50
 
51
51
  # @nodoc
52
- def context=(req)
53
- wrap_impl(@impl.context=(unwrap_impl(req)))
52
+ def page=(req)
53
+ wrap_impl(@impl.page=(unwrap_impl(req)))
54
54
  end
55
55
 
56
56
  # -- inherited from EventEmitter --
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playwright-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.26.0
4
+ version: 1.27.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-25 00:00:00.000000000 Z
11
+ date: 2022-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -327,6 +327,7 @@ files:
327
327
  - lib/playwright/javascript/visitor_info.rb
328
328
  - lib/playwright/keyboard_impl.rb
329
329
  - lib/playwright/locator_impl.rb
330
+ - lib/playwright/locator_utils.rb
330
331
  - lib/playwright/mouse_impl.rb
331
332
  - lib/playwright/playwright_api.rb
332
333
  - lib/playwright/raw_headers.rb
@@ -399,5 +400,5 @@ requirements: []
399
400
  rubygems_version: 3.3.7
400
401
  signing_key:
401
402
  specification_version: 4
402
- summary: The Ruby binding of playwright driver 1.26.0
403
+ summary: The Ruby binding of playwright driver 1.27.0
403
404
  test_files: []