test: Wait for alerts harder.

This commit is contained in:
2025-11-29 10:01:12 -05:00
parent 510c2f81bd
commit d2e5015eac

View File

@@ -179,14 +179,14 @@ try:
select(driver, ['//button[text()="✅ Allow"]'], ('click',))
words = select(driver, ['#document', 'frame', '//li//textarea']).get_attribute('value')
select(driver, ['#document', 'frame', '//li/button[text()="Delete Identity"]'], ('click',))
driver.switch_to.alert.send_keys('DELETE')
driver.switch_to.alert.accept()
wait.until(expected_conditions.alert_is_present()).send_keys('DELETE')
wait.until(expected_conditions.alert_is_present()).accept()
select(driver, ['//button[text()="✅ Allow"]'], ('click',))
driver.switch_to.alert.accept()
wait.until(expected_conditions.alert_is_present()).accept()
words = select(driver, ['#document', 'frame', '//textarea'], ('send_keys', words))
select(driver, ['#document', 'frame', '//button[text()="Import Identity"]'], ('click',))
select(driver, ['//button[text()="✅ Allow"]'], ('click',))
driver.switch_to.alert.accept()
wait.until(expected_conditions.alert_is_present()).accept()
driver.switch_to.frame(wait.until(expected_conditions.presence_of_element_located((By.ID, 'document'))))
id1 = select(driver, ['#document', 'frame', 'li']).text.split(' ')[-1]
assert id0 == id1
@@ -197,16 +197,16 @@ try:
select(driver, ['#document', 'frame', 'tf-app', 'shadow_root', '#tf-tab-news', 'shadow_root', '#tf-compose', 'shadow_root', '#submit'], ('click',))
select(driver, ['//label[text()="Remember this decision."]'], ('click',))
select(driver, ['//button[text()="❌ Deny"]'], ('click',))
driver.switch_to.alert.accept()
wait.until(expected_conditions.alert_is_present()).accept()
select(driver, ['#document', 'frame', 'tf-app', 'shadow_root', '#tf-tab-news', 'shadow_root', '#tf-compose', 'shadow_root', '#submit'], ('click',))
driver.switch_to.alert.accept()
wait.until(expected_conditions.alert_is_present()).accept()
select(driver, ['#document', 'frame', 'tf-app', 'shadow_root', '#tf-tab-news', 'shadow_root', '#tf-compose', 'shadow_root', '#submit'], ('click',))
select(driver, ['tf-navigation', 'shadow_root', '=🎛️'], ('click',))
select(driver, ['tf-navigation', 'shadow_root', '#permission_reset:ssb_append'], ('click',))
select(driver, ['tf-navigation', 'shadow_root', '#permissions_close'], ('click',))
select(driver, ['#document', 'frame', 'tf-app', 'shadow_root', '#tf-tab-news', 'shadow_root', '#tf-compose', 'shadow_root', '#submit'], ('click',))
select(driver, ['//button[text()="❌ Deny"]'], ('click',))
driver.switch_to.alert.accept()
wait.until(expected_conditions.alert_is_present()).accept()
select(driver, ['#document', 'frame', 'tf-app', 'shadow_root', '#tf-tab-news', 'shadow_root', '#tf-compose', 'shadow_root', '#submit'], ('click',))
select(driver, ['//button[text()="✅ Allow"]'], ('click',))
select(driver, ['#document', 'frame', 'tf-app', 'shadow_root', '#tf-tab-news', 'shadow_root', '#tf-compose', 'shadow_root', '#edit'], ('send_keys', 'Hello, world 2!'))