Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/trunk' into safari_service_test
Browse files Browse the repository at this point in the history
  • Loading branch information
VietND96 committed Nov 3, 2024
2 parents d583b18 + 0219666 commit 350587e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions py/test/selenium/webdriver/common/bidi_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

from selenium.webdriver.common.by import By
from selenium.webdriver.common.log import Log
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait


Expand Down Expand Up @@ -76,8 +75,6 @@ async def test_collect_log_mutations(driver, pages):
WebDriverWait(driver, 10).until(
lambda d: d.find_element(By.ID, "revealed").value_of_css_property("display") != "none"
)
WebDriverWait(driver, 5).until(EC.visibility_of(driver.find_element(By.ID, "revealed")))

assert event["attribute_name"] == "style"
assert event["current_value"] == ""
assert event["old_value"] == "display:none;"
10 changes: 5 additions & 5 deletions py/test/selenium/webdriver/common/upload_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

from selenium.webdriver.common.by import By
from selenium.webdriver.remote.webelement import WebElement
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.wait import WebDriverWait


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

assert "test_file.txt" in body
WebDriverWait(driver, 10).until(EC.text_to_be_present_in_element((By.CSS_SELECTOR, "body"), "test_file.txt"))


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

assert "test_file.txt" in body
assert "test_file2.txt" in body
WebDriverWait(driver, 10).until(EC.text_to_be_present_in_element((By.CSS_SELECTOR, "body"), "test_file.txt"))
WebDriverWait(driver, 10).until(EC.text_to_be_present_in_element((By.CSS_SELECTOR, "body"), "test_file2.txt"))


@pytest.mark.xfail_firefox
Expand Down

0 comments on commit 350587e

Please sign in to comment.