playwright-ruby-client 1.15.1 → 1.16.beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -71,7 +71,7 @@ module Playwright
71
71
  {
72
72
  apiName: api_name,
73
73
  stack: stacks.map do |loc|
74
- { file: loc.absolute_path || '', line: loc.lineno, function: loc.label }
74
+ { file: loc.absolute_path, line: loc.lineno, function: loc.label }
75
75
  end,
76
76
  }
77
77
  end
@@ -593,7 +593,9 @@ module Playwright
593
593
  end
594
594
 
595
595
  def wait_for_timeout(timeout)
596
- sleep(timeout / 1000.0)
596
+ @channel.send_message_to_server('waitForTimeout', timeout: timeout)
597
+
598
+ nil
597
599
  end
598
600
 
599
601
  def wait_for_function(pageFunction, arg: nil, polling: nil, timeout: nil)
@@ -303,6 +303,10 @@ module Playwright
303
303
  trial: trial)
304
304
  end
305
305
 
306
+ def wait_for(state: nil, timeout: nil)
307
+ @frame.wait_for_selector(@selector, strict: true, state: state, timeout: timeout)
308
+ end
309
+
306
310
  def set_checked(checked, **options)
307
311
  if checked
308
312
  check(**options)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playwright
4
- VERSION = '1.15.1'
5
- COMPATIBLE_PLAYWRIGHT_VERSION = '1.15.2'
4
+ VERSION = '1.16.beta1'
5
+ COMPATIBLE_PLAYWRIGHT_VERSION = '1.16.0'
6
6
  end
@@ -20,6 +20,7 @@ module Playwright
20
20
  data: nil,
21
21
  failOnStatusCode: nil,
22
22
  headers: nil,
23
+ ignoreHTTPSErrors: nil,
23
24
  method: nil,
24
25
  params: nil,
25
26
  timeout: nil)
@@ -32,6 +33,7 @@ module Playwright
32
33
  urlOrRequest,
33
34
  failOnStatusCode: nil,
34
35
  headers: nil,
36
+ ignoreHTTPSErrors: nil,
35
37
  params: nil,
36
38
  timeout: nil)
37
39
  raise NotImplementedError.new('get is not implemented yet.')
@@ -44,6 +46,7 @@ module Playwright
44
46
  data: nil,
45
47
  failOnStatusCode: nil,
46
48
  headers: nil,
49
+ ignoreHTTPSErrors: nil,
47
50
  params: nil,
48
51
  timeout: nil)
49
52
  raise NotImplementedError.new('post is not implemented yet.')
@@ -540,6 +540,19 @@ module Playwright
540
540
  wrap_impl(@impl.uncheck(force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
541
541
  end
542
542
 
543
+ # Returns when element specified by locator satisfies the `state` option.
544
+ #
545
+ # If target element already satisfies the condition, the method returns immediately. Otherwise, waits for up to `timeout`
546
+ # milliseconds until the condition is met.
547
+ #
548
+ # ```python sync
549
+ # order_sent = page.locator("#order-sent")
550
+ # order_sent.wait_for()
551
+ # ```
552
+ def wait_for(state: nil, timeout: nil)
553
+ wrap_impl(@impl.wait_for(state: unwrap_impl(state), timeout: unwrap_impl(timeout)))
554
+ end
555
+
543
556
  # @nodoc
544
557
  def to_s
545
558
  wrap_impl(@impl.to_s)
@@ -44,13 +44,13 @@ module Playwright
44
44
  end
45
45
 
46
46
  # @nodoc
47
- def context=(req)
48
- wrap_impl(@impl.context=(unwrap_impl(req)))
47
+ def page=(req)
48
+ wrap_impl(@impl.page=(unwrap_impl(req)))
49
49
  end
50
50
 
51
51
  # @nodoc
52
- def page=(req)
53
- wrap_impl(@impl.page=(unwrap_impl(req)))
52
+ def context=(req)
53
+ wrap_impl(@impl.context=(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.15.1
4
+ version: 1.16.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-07 00:00:00.000000000 Z
11
+ date: 2021-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -378,12 +378,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
378
378
  version: '2.4'
379
379
  required_rubygems_version: !ruby/object:Gem::Requirement
380
380
  requirements:
381
- - - ">="
381
+ - - ">"
382
382
  - !ruby/object:Gem::Version
383
- version: '0'
383
+ version: 1.3.1
384
384
  requirements: []
385
385
  rubygems_version: 3.2.22
386
386
  signing_key:
387
387
  specification_version: 4
388
- summary: The Ruby binding of playwright driver 1.15.2
388
+ summary: The Ruby binding of playwright driver 1.16.0
389
389
  test_files: []