File tree Expand file tree Collapse file tree 4 files changed +29
-1
lines changed Expand file tree Collapse file tree 4 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ USER root
6
6
RUN apt-get update -qqy \
7
7
&& apt-get -qqy install \
8
8
xvfb \
9
+ pulseaudio \
9
10
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
10
11
11
12
#==============================
Original file line number Diff line number Diff line change @@ -7,6 +7,16 @@ if [ ! -e /opt/selenium/config.json ]; then
7
7
exit 1
8
8
fi
9
9
10
+ # Start the pulseaudio server
11
+ pulseaudio -D --exit-idle-time=-1
12
+
13
+ # Load the virtual sink and set it as default
14
+ pacmd load-module module-virtual-sink sink_name=v1
15
+ pacmd set-default-sink v1
16
+
17
+ # set the monitor of v1 sink to be the default source
18
+ pacmd set-default-source v1.monitor
19
+
10
20
# In the long term the idea is to remove $HUB_PORT_4444_TCP_ADDR and $HUB_PORT_4444_TCP_PORT and only work with
11
21
# $HUB_HOST and $HUB_PORT
12
22
if [ ! -z " $HUB_HOST " ]; then
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ USER root
6
6
ARG FIREFOX_VERSION=latest
7
7
RUN FIREFOX_DOWNLOAD_URL=$(if [ $FIREFOX_VERSION = "latest" ] || [ $FIREFOX_VERSION = "nightly-latest" ] || [ $FIREFOX_VERSION = "devedition-latest" ]; then echo "https://download.mozilla.org/?product=firefox-$FIREFOX_VERSION-ssl&os=linux64&lang=en-US"; else echo "https://download-installer.cdn.mozilla.net/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2"; fi) \
8
8
&& apt-get update -qqy \
9
- && apt-get -qqy --no-install-recommends install firefox \
9
+ && apt-get -qqy --no-install-recommends install firefox libavcodec-extra \
10
10
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \
11
11
&& wget --no-verbose -O /tmp/firefox.tar.bz2 $FIREFOX_DOWNLOAD_URL \
12
12
&& apt-get -y purge firefox \
Original file line number Diff line number Diff line change 1
1
import unittest
2
2
from selenium import webdriver
3
+ from selenium .webdriver .common .by import By
4
+ from selenium .webdriver .support .ui import WebDriverWait
5
+ from selenium .webdriver .support import expected_conditions as EC
3
6
from selenium .webdriver .common .desired_capabilities import DesiredCapabilities
4
7
5
8
@@ -39,6 +42,20 @@ def test_visit_basic_auth_secured_page(self):
39
42
page_message = driver .find_element_by_css_selector ('.example p' ).text
40
43
self .assertTrue (page_message == 'Congratulations! You must have the proper credentials.' )
41
44
45
+ def test_play_video (self ):
46
+ driver = self .driver
47
+ driver .get ('https://hls-js.netlify.com/demo/' )
48
+ wait = WebDriverWait (driver , 30 )
49
+ video = wait .until (
50
+ EC .element_to_be_clickable ((By .TAG_NAME , 'video' ))
51
+ )
52
+ video .click ()
53
+ wait .until (
54
+ lambda d : d .find_element_by_tag_name ('video' ).get_property ('currentTime' )
55
+ )
56
+ paused = video .get_property ('paused' )
57
+ self .assertFalse (paused )
58
+
42
59
def tearDown (self ):
43
60
self .driver .quit ()
44
61
You can’t perform that action at this time.
0 commit comments