fe_core_ext 0.32.1 → 0.33.0

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: e03934108a512eada22df20a49377eacbcc98decb4cf1ef976a6b4a68625d878
4
+ data.tar.gz: 47c126a960a3c00b535ad7c0de71a00dd891bf1c3df80a25e252376ea0c32bb9
5
5
  SHA512:
6
- metadata.gz: a99aa40c9559997728260c51822d934d324b534f8ed5498cb5b230d23d7ee5aec2163e88634e1307b782d5ce3ad4f8ceeda37ed93f25d513e594fdaaf0f05ee7
7
- data.tar.gz: 00277dc37128f4bd68e0abaec8f5eb5fdd67e858bf831072a876c34d9331d344de5d96b0311e7bba238ac6ca3a1c3a9a6a73c52eb69fba40fd6d1a1fb4462b62
6
+ metadata.gz: b0237b7d187495a4362e7cd499cafefd9ac5a4ba0092a7e6988c98cccfeef01c6022a6e7f175dc2224d24f768cf513ee7d478bab6cfd84042d58dd6b06e88d01
7
+ data.tar.gz: 0e2294134a6b53bbe9cebd60e311549220559429ac5586b02914ce036d34948df94e13a279b9b63ed70f833441169c2f637eb3f2fbdae4bfdf705120dd01a634
@@ -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 %i[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 %i[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.0"
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.0
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