fe_core_ext 0.32.1 → 0.33.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f2a87561be521ad11c7d5b9c45c292b44dd806c14e2d4e836df71102bda24b92
4
- data.tar.gz: 8f7cb9da94fe4add3c0460a135b2a53ff3ef2b5b4273c2c6531fdff221af7a5e
3
+ metadata.gz: df9a459af54ccbe9da684fb43286e1a38cd9a8f6ef4e475325269f9690ae164f
4
+ data.tar.gz: f986708bf317175cdb7fc4d51b13cb6d13b5786d662ae5baaa6ad80f58795299
5
5
  SHA512:
6
- metadata.gz: a99aa40c9559997728260c51822d934d324b534f8ed5498cb5b230d23d7ee5aec2163e88634e1307b782d5ce3ad4f8ceeda37ed93f25d513e594fdaaf0f05ee7
7
- data.tar.gz: 00277dc37128f4bd68e0abaec8f5eb5fdd67e858bf831072a876c34d9331d344de5d96b0311e7bba238ac6ca3a1c3a9a6a73c52eb69fba40fd6d1a1fb4462b62
6
+ metadata.gz: 6965024375b50d8b8de703368e12f8a972d4c774e2b0a4d0a29db05dbd0ef2d108ced5a292781849db72262561dfb0b3e6384b7f873014fcaf31271c5b36560c
7
+ data.tar.gz: 10ff4f80e8bd5818c6619bb7243bccbec369661c7185709e849739ce878fa35469440c03a91ea9d437ef70ed8084ae264c6a3484317e0724fefdbcb34a558723
@@ -2,15 +2,23 @@
2
2
 
3
3
  module Ferrum
4
4
  class Browser
5
- delegate :wait_for_css, :wait_for_xpath, to: :page
5
+ delegate :wait_for_css, :wait_for_csses, :wait_for_xpath, :wait_for_xpaths, to: :page
6
6
  end
7
7
 
8
8
  class Page
9
- delegate :wait_for_css, :wait_for_xpath, to: :main_frame
9
+ delegate :wait_for_css, :wait_for_csses, :wait_for_xpath, :wait_for_xpaths, to: :main_frame
10
10
  end
11
11
 
12
12
  class Frame
13
13
  module DOM
14
+ def wait_for_csses(selector, timeout: 3)
15
+ wait_for_selector(selector, :css, timeout)
16
+ end
17
+
18
+ def wait_for_xpaths(selector, timeout: 3)
19
+ wait_for_selector(selector, :xpath, timeout)
20
+ end
21
+
14
22
  def wait_for_css(selector, timeout: 3)
15
23
  wait_for_selector(selector, :at_css, timeout)
16
24
  end
@@ -24,8 +32,8 @@ module Ferrum
24
32
  def wait_for_selector(selector, selector_method, timeout)
25
33
  interval = 0.1
26
34
  (timeout / interval).to_i.times do
27
- node = send(selector_method, selector)
28
- return node if node
35
+ nodes = send(selector_method, selector)
36
+ return nodes if nodes
29
37
  sleep(interval)
30
38
  end
31
39
  nil
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FeCoreExt
4
- VERSION = "0.32.1"
4
+ VERSION = "0.33.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fe_core_ext
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.1
4
+ version: 0.33.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tetsu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-08 00:00:00.000000000 Z
11
+ date: 2023-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport