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 +4 -4
- data/lib/fe_core_ext/gem_ext/ferrum.rb +12 -4
- data/lib/fe_core_ext/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df9a459af54ccbe9da684fb43286e1a38cd9a8f6ef4e475325269f9690ae164f
|
4
|
+
data.tar.gz: f986708bf317175cdb7fc4d51b13cb6d13b5786d662ae5baaa6ad80f58795299
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
28
|
-
return
|
35
|
+
nodes = send(selector_method, selector)
|
36
|
+
return nodes if nodes
|
29
37
|
sleep(interval)
|
30
38
|
end
|
31
39
|
nil
|
data/lib/fe_core_ext/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2023-11-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|