Skip to content

Commit 15dda29

Browse files
committed
Improve reliability of "show_file_choosers()"
1 parent 723e9eb commit 15dda29

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

seleniumbase/fixtures/base_case.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5423,6 +5423,12 @@ def ad_block(self):
54235423
def show_file_choosers(self):
54245424
"""Display hidden file-chooser input fields on sites if present."""
54255425
css_selector = 'input[type="file"]'
5426+
try:
5427+
self.wait_for_element_present(
5428+
css_selector, timeout=settings.MINI_TIMEOUT
5429+
)
5430+
except Exception:
5431+
pass
54265432
try:
54275433
self.show_elements(css_selector)
54285434
except Exception:

0 commit comments

Comments
 (0)