forked from Fediversity/Fediversity
nicer timing for video
This commit is contained in:
parent
a2da2f48b2
commit
5b26cfc7a9
|
@ -173,7 +173,7 @@ in {
|
||||||
script = ''
|
script = ''
|
||||||
set -xeuo pipefail
|
set -xeuo pipefail
|
||||||
# give garage time to start up
|
# give garage time to start up
|
||||||
sleep 60
|
sleep 10
|
||||||
|
|
||||||
# XXX: this is very sensitive to being a single instance
|
# XXX: this is very sensitive to being a single instance
|
||||||
# (doing the bare minimum to get garage up and running)
|
# (doing the bare minimum to get garage up and running)
|
||||||
|
|
|
@ -8,6 +8,7 @@ let
|
||||||
} ''
|
} ''
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
import time
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
from selenium.webdriver.common.by import By
|
from selenium.webdriver.common.by import By
|
||||||
from selenium.webdriver.support.wait import WebDriverWait
|
from selenium.webdriver.support.wait import WebDriverWait
|
||||||
|
@ -42,14 +43,22 @@ let
|
||||||
driver.find_element(By.ID, "password").send_keys(password)
|
driver.find_element(By.ID, "password").send_keys(password)
|
||||||
# FIXME: This is disgusting. Find instead the input type submit in the form
|
# FIXME: This is disgusting. Find instead the input type submit in the form
|
||||||
# with action ending in "/login".
|
# with action ending in "/login".
|
||||||
|
time.sleep(1)
|
||||||
print("Click “Login” button...")
|
print("Click “Login” button...")
|
||||||
driver.find_element(By.XPATH, "//button[normalize-space()='Login']").click()
|
driver.find_element(By.XPATH, "//button[normalize-space()='Login']").click()
|
||||||
|
|
||||||
|
time.sleep(3)
|
||||||
|
|
||||||
# Find the new post form, fill it in with our pictureand a caption.
|
# Find the new post form, fill it in with our pictureand a caption.
|
||||||
print("Click on “Create New Post”...")
|
print("Click on “Create New Post”...")
|
||||||
driver.find_element(By.LINK_TEXT, "Create New Post").click()
|
driver.find_element(By.LINK_TEXT, "Create New Post").click()
|
||||||
print("Add file to input element...")
|
print("Add file to input element...")
|
||||||
driver.find_element(By.XPATH, "//input[@type='file']").send_keys(green_path)
|
driver.find_element(By.XPATH, "//input[@type='file']").send_keys(media_path)
|
||||||
|
print("Add a caption")
|
||||||
|
driver.find_element(By.CSS_SELECTOR, ".media-body textarea").send_keys(
|
||||||
|
"Fediversity test of image upload to pixelfed with garage storage."
|
||||||
|
)
|
||||||
|
time.sleep(3)
|
||||||
print("Click on “Post” button...")
|
print("Click on “Post” button...")
|
||||||
driver.find_element(By.LINK_TEXT, "Post").click()
|
driver.find_element(By.LINK_TEXT, "Post").click()
|
||||||
|
|
||||||
|
@ -64,6 +73,7 @@ let
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
time.sleep(3)
|
||||||
print("Take screenshot...")
|
print("Take screenshot...")
|
||||||
if not driver.save_screenshot(screenshot_path):
|
if not driver.save_screenshot(screenshot_path):
|
||||||
raise Exception("selenium could not save screenshot")
|
raise Exception("selenium could not save screenshot")
|
||||||
|
|
Loading…
Reference in a new issue