Skip to content

Commit c25b39d

Browse files
author
konstantina
committed
Modified test_walkthrough.py to avoid random failures when testing page 4.
When on page 4 test waits for the boards list to be loaded before selecting a board.
1 parent e6bd116 commit c25b39d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/walkthrough/test_walkthrough.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ def test_page_3(self):
3838

3939
def test_page_4(self):
4040
"""Test page 4"""
41-
cb_cf_boards = self.get_element(By.CSS_SELECTOR, '#cb_cf_boards')
42-
assert cb_cf_boards.is_displayed()
41+
WebDriverWait(self.driver, 30).until(
42+
expected_conditions.presence_of_element_located((By.CSS_SELECTOR, '#cb_cf_boards optgroup[label="Arduino"]'))
43+
)
4344
self.execute_script(SELECT_BOARD_SCRIPT(TEST_BOARD), '$')
4445
cb_cf_ports = self.get_element(By.CSS_SELECTOR, '#cb_cf_ports')
4546
assert cb_cf_ports.is_displayed()

0 commit comments

Comments
 (0)