1 |
|
|
2 |
module PageObject |
1✔ |
3 |
module Elements |
1✔ |
4 |
class Media < Element |
1✔ |
5 |
|
|
6 |
def autoplay? |
1✔ |
7 |
attribute(:autoplay)
|
× |
8 |
end
|
|
9 |
|
|
10 |
def has_controls? |
1✔ |
11 |
attribute(:controls)
|
× |
12 |
end
|
|
13 |
|
|
14 |
def paused? |
1✔ |
15 |
attribute(:paused)
|
× |
16 |
end
|
|
17 |
|
|
18 |
def duration |
1✔ |
19 |
duration = attribute(:duration)
|
× |
20 |
return duration.to_f if duration |
× |
21 |
end
|
|
22 |
|
|
23 |
def volume |
1✔ |
24 |
volume = attribute(:volume)
|
× |
25 |
return volume.to_i if volume |
× |
26 |
end
|
|
27 |
|
|
28 |
def ended? |
1✔ |
29 |
attribute(:ended)
|
× |
30 |
end
|
|
31 |
|
|
32 |
def seeking? |
1✔ |
33 |
attribute(:seeking)
|
× |
34 |
end
|
|
35 |
|
|
36 |
def loop? |
1✔ |
37 |
attribute(:loop)
|
× |
38 |
end
|
|
39 |
|
|
40 |
def muted? |
1✔ |
41 |
attribute(:muted)
|
× |
42 |
end
|
|
43 |
end
|
|
44 |
end
|
|
45 |
end
|