selenium-webdriver 4.0.0.rc2 → 4.0.0.rc3

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: 4481c4b877188aa5f972209d98ad2f6387ecdeac3e4a61f1e4758f09eb1bab28
4
- data.tar.gz: bc3e42035ed3a22b444fbe1a03d43d08e2e8558a4fd498950d23666606919148
3
+ metadata.gz: 2ab22cf48ce547f745515fdd60b09f44788f92bc7a6a339c43462c53d8161cab
4
+ data.tar.gz: 898185398832035b0c29294eb83f05883650ff3e61a5ecdc3da8842a454c28bd
5
5
  SHA512:
6
- metadata.gz: 7d43469e0863264b60306fda4c035eb86112f14e119ef371d53aeef45765a540b76a844bbc482d78940b8a7349c5e91b0f5ac8acc3aa9cbaf78b3db12ef62f6d
7
- data.tar.gz: 0b5dc50ae4fc05a89da9a547cba5f0d5fcdcbc4f233095087ef5a75fd98c34745ac7a30e616792bc853993c708f66babe186fbb4cc68415296cdaab0aa264a9b
6
+ metadata.gz: 9147cc75bbabff4744ba484bbf23e4fd5a6d683e201315eb42f536f07f35789a78151f3b5abc53da60624c5681f90e064da5ec5dd30117bbb8d33b71f1b37b6a
7
+ data.tar.gz: 173788de6fc1b98ac83255f49cf8e03a5e7d1b7c68853077a7a6d6b96880e768daad66aaa2f228e72d8f76db4c8c13070c762860a6ecccbaf98e4190c1ccf990
data/CHANGES CHANGED
@@ -1,3 +1,9 @@
1
+ 4.0.0.rc3 (2021-10-08)
2
+ =========================
3
+
4
+ Ruby:
5
+ * Added support for getting timeout values from the driver
6
+
1
7
  4.0.0.rc2 (2021-09-30)
2
8
  =========================
3
9
 
@@ -24,22 +24,49 @@ module Selenium
24
24
  @bridge = bridge
25
25
  end
26
26
 
27
+ #
28
+ # Gets the amount of time the driver should wait when searching for elements.
29
+ #
30
+
31
+ def implicit_wait
32
+ Float(@bridge.timeouts['implicit']) / 1000
33
+ end
34
+
27
35
  #
28
36
  # Set the amount of time the driver should wait when searching for elements.
29
37
  #
30
38
 
31
39
  def implicit_wait=(seconds)
32
- @bridge.implicit_wait_timeout = Integer(seconds * 1000)
40
+ @bridge.timeouts = {'implicit' => Integer(seconds * 1000)}
33
41
  end
34
42
 
43
+ #
44
+ # Gets the amount of time to wait for an asynchronous script to finish
45
+ # execution before throwing an error.
46
+ #
47
+
48
+ def script
49
+ Float(@bridge.timeouts['script']) / 1000
50
+ end
51
+ alias_method :script_timeout, :script
52
+
35
53
  #
36
54
  # Sets the amount of time to wait for an asynchronous script to finish
37
55
  # execution before throwing an error. If the timeout is negative, then the
38
56
  # script will be allowed to run indefinitely.
39
57
  #
40
58
 
41
- def script_timeout=(seconds)
42
- @bridge.script_timeout = Integer(seconds * 1000)
59
+ def script=(seconds)
60
+ @bridge.timeouts = {'script' => Integer(seconds * 1000)}
61
+ end
62
+ alias_method :script_timeout=, :script=
63
+
64
+ #
65
+ # Gets the amount of time to wait for a page load to complete before throwing an error.
66
+ #
67
+
68
+ def page_load
69
+ Float(@bridge.timeouts['pageLoad']) / 1000
43
70
  end
44
71
 
45
72
  #
@@ -48,7 +75,7 @@ module Selenium
48
75
  #
49
76
 
50
77
  def page_load=(seconds)
51
- @bridge.timeout 'page load', Integer(seconds * 1000)
78
+ @bridge.timeouts = {'pageLoad' => Integer(seconds * 1000)}
52
79
  end
53
80
  end # Timeouts
54
81
  end # WebDriver
@@ -93,17 +93,16 @@ module Selenium
93
93
  execute :get, {}, {url: url}
94
94
  end
95
95
 
96
- def implicit_wait_timeout=(milliseconds)
97
- timeout('implicit', milliseconds)
98
- end
96
+ #
97
+ # timeouts
98
+ #
99
99
 
100
- def script_timeout=(milliseconds)
101
- timeout('script', milliseconds)
100
+ def timeouts
101
+ execute :get_timeouts, {}
102
102
  end
103
103
 
104
- def timeout(type, milliseconds)
105
- type = 'pageLoad' if type == 'page load'
106
- execute :set_timeout, {}, {type => milliseconds}
104
+ def timeouts=(timeouts)
105
+ execute :set_timeout, {}, timeouts
107
106
  end
108
107
 
109
108
  #
@@ -114,6 +114,7 @@ module Selenium
114
114
  # timeouts
115
115
  #
116
116
 
117
+ get_timeouts: [:get, 'session/:session_id/timeouts'],
117
118
  set_timeout: [:post, 'session/:session_id/timeouts'],
118
119
 
119
120
  #
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Selenium
21
21
  module WebDriver
22
- VERSION = '4.0.0.rc2'
22
+ VERSION = '4.0.0.rc3'
23
23
  end # WebDriver
24
24
  end # Selenium
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: selenium-webdriver
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.rc2
4
+ version: 4.0.0.rc3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Rodionov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-09-30 00:00:00.000000000 Z
13
+ date: 2021-10-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: childprocess