@@ -19,7 +19,7 @@ def delete_files_regex_string():
19
19
return r"\bdownload\b"
20
20
21
21
22
- MIXED_CONTENT_DOWNLOAD_URL = "https://b-mcb-download.glitch.me/ "
22
+ MIXED_CONTENT_DOWNLOAD_URL = "https://file-examples.com/wp-content/storage/2018/04/file_example_AVI_480_750kB.avi "
23
23
24
24
25
25
def test_mixed_content_download_via_https (driver : Firefox , delete_files ):
@@ -29,14 +29,10 @@ def test_mixed_content_download_via_https(driver: Firefox, delete_files):
29
29
30
30
web_page = GenericPage (driver , url = MIXED_CONTENT_DOWNLOAD_URL )
31
31
32
- # Wait up to 30 seconds for test website to wake up and load the content
32
+ # Wait up to 30 seconds for test website to wake up and download the content
33
33
web_page .open ()
34
34
with driver .context (driver .CONTEXT_CHROME ):
35
- WebDriverWait (driver , 30 ).until (EC .title_contains ("Hello!" ))
36
-
37
- WebDriverWait (driver , 5 ).until (
38
- EC .presence_of_element_located ((By .XPATH , "//button[@onclick='runtestSec()']" ))
39
- ).click ()
35
+ WebDriverWait (driver , 30 ).until (EC .title_contains ("File Examples" ))
40
36
41
37
with driver .context (driver .CONTEXT_CHROME ):
42
38
download_name = WebDriverWait (driver , 10 ).until (
@@ -49,7 +45,7 @@ def test_mixed_content_download_via_https(driver: Firefox, delete_files):
49
45
50
46
# Verify that the desired download target element is present directly, no extra steps needed.
51
47
download_value = download_name .get_attribute ("value" )
52
- assert re .match (r"download (\(\d+\))? $" , download_value ), (
48
+ assert re .match (r"file_example_AVI_480_750kB (\(\d+\)).avi $" , download_value ), (
53
49
f"The download name is incorrect: { download_value } "
54
50
)
55
51
0 commit comments