Skip to content

Commit 350587e

Browse files
committed
Merge remote-tracking branch 'origin/trunk' into safari_service_test
2 parents d583b18 + 0219666 commit 350587e

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

py/test/selenium/webdriver/common/bidi_tests.py

-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
from selenium.webdriver.common.by import By
2020
from selenium.webdriver.common.log import Log
21-
from selenium.webdriver.support import expected_conditions as EC
2221
from selenium.webdriver.support.ui import WebDriverWait
2322

2423

@@ -76,8 +75,6 @@ async def test_collect_log_mutations(driver, pages):
7675
WebDriverWait(driver, 10).until(
7776
lambda d: d.find_element(By.ID, "revealed").value_of_css_property("display") != "none"
7877
)
79-
WebDriverWait(driver, 5).until(EC.visibility_of(driver.find_element(By.ID, "revealed")))
80-
8178
assert event["attribute_name"] == "style"
8279
assert event["current_value"] == ""
8380
assert event["old_value"] == "display:none;"

py/test/selenium/webdriver/common/upload_tests.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
from selenium.webdriver.common.by import By
2323
from selenium.webdriver.remote.webelement import WebElement
24+
from selenium.webdriver.support import expected_conditions as EC
25+
from selenium.webdriver.support.wait import WebDriverWait
2426

2527

2628
@pytest.fixture
@@ -39,9 +41,8 @@ def test_can_upload_file(driver, pages, get_local_path):
3941
driver.find_element(By.ID, "upload").send_keys(get_local_path("test_file.txt"))
4042
driver.find_element(By.ID, "go").click()
4143
driver.switch_to.frame(driver.find_element(By.ID, "upload_target"))
42-
body = driver.find_element(By.CSS_SELECTOR, "body").text
4344

44-
assert "test_file.txt" in body
45+
WebDriverWait(driver, 10).until(EC.text_to_be_present_in_element((By.CSS_SELECTOR, "body"), "test_file.txt"))
4546

4647

4748
def test_can_upload_two_files(driver, pages, get_local_path):
@@ -50,10 +51,9 @@ def test_can_upload_two_files(driver, pages, get_local_path):
5051
driver.find_element(By.ID, "upload").send_keys(two_file_paths)
5152
driver.find_element(By.ID, "go").click()
5253
driver.switch_to.frame(driver.find_element(By.ID, "upload_target"))
53-
body = driver.find_element(By.CSS_SELECTOR, "body").text
5454

55-
assert "test_file.txt" in body
56-
assert "test_file2.txt" in body
55+
WebDriverWait(driver, 10).until(EC.text_to_be_present_in_element((By.CSS_SELECTOR, "body"), "test_file.txt"))
56+
WebDriverWait(driver, 10).until(EC.text_to_be_present_in_element((By.CSS_SELECTOR, "body"), "test_file2.txt"))
5757

5858

5959
@pytest.mark.xfail_firefox

0 commit comments

Comments
 (0)