deployment: openvidu_health_check fix timeout on firefox

pull/669/head
cruizba 2021-11-05 13:37:51 +01:00
parent 1eba0f3602
commit 6c122cd645
1 changed files with 5 additions and 3 deletions

View File

@ -83,6 +83,7 @@ class InfraSmokeTests(unittest.TestCase):
video_error = False video_error = False
try: try:
self.driver.find_element(By.XPATH, "//*[contains(text(), 'Stream playing')]") self.driver.find_element(By.XPATH, "//*[contains(text(), 'Stream playing')]")
print('Video detected.\n')
except: except:
video_error = True video_error = True
finally: finally:
@ -93,7 +94,9 @@ class InfraSmokeTests(unittest.TestCase):
if video_error == True: if video_error == True:
raise Exception('Error. No video detected') raise Exception('Error. No video detected')
print('Video detected.\n') time.sleep(3)
self.driver.switch_to.window(self.driver.window_handles[0])
time.sleep(3)
elem = self.driver.find_element(By.ID,'test-btn') elem = self.driver.find_element(By.ID,'test-btn')
elem.send_keys(Keys.RETURN) elem.send_keys(Keys.RETURN)
@ -174,9 +177,8 @@ class InfraSmokeTests(unittest.TestCase):
print(from_html_one(html_ice_table)) print(from_html_one(html_ice_table))
# Go to main window # Go to main window
self.driver.close() self.driver.close()
self.driver.switch_to.window(self.driver.window_handles[0])
except: except:
print('Error getting candidates') pass
def closeBrowser(self): def closeBrowser(self):
# close the browser window # close the browser window