main
Last change
on this file was
42bd667,
checked in by David Fuertes <dfuertes@…>, 4 years ago
|
Historial Limpio
|
-
Property mode set to
100644
|
File size:
1.5 KB
|
Line | |
---|
1 | from time import sleep |
---|
2 | |
---|
3 | from baseTest import BaseTest, URL_ROOT |
---|
4 | from selenium.common.exceptions import NoSuchElementException |
---|
5 | |
---|
6 | from selenium.webdriver.common.by import By |
---|
7 | from selenium import webdriver |
---|
8 | from selenium.webdriver.support.ui import WebDriverWait |
---|
9 | from selenium.webdriver.support import expected_conditions as ec |
---|
10 | |
---|
11 | |
---|
12 | |
---|
13 | class TestDoReserveConnectUnreserve (BaseTest): |
---|
14 | |
---|
15 | |
---|
16 | def __select_lab(self): |
---|
17 | self.get_ou().click() |
---|
18 | self.get_lab().click() |
---|
19 | sleep(2) |
---|
20 | |
---|
21 | def test_do_reserve_connect_unreserve(self): |
---|
22 | self.doLogin() |
---|
23 | |
---|
24 | self.__select_lab() |
---|
25 | self.get_button_reserve().click() |
---|
26 | self.get_button_select_broser().click() |
---|
27 | sleep(5) |
---|
28 | self.assertIn("Equipo concedido", self.get_console_log().get_attribute("value")) |
---|
29 | |
---|
30 | WebDriverWait(self.browser, 100).until(ec.invisibility_of_element_located((By.ID, 'text_consolelog'))) |
---|
31 | |
---|
32 | sleep(1) |
---|
33 | self.get_button_connect().click() |
---|
34 | sleep(4) |
---|
35 | self.browser.switch_to.window(self.browser.window_handles[1]) |
---|
36 | self.assertIsNotNone(self.get_canvas()) |
---|
37 | |
---|
38 | sleep(2) |
---|
39 | self.browser.switch_to.window(self.browser.window_handles[0]) |
---|
40 | button_used = self.get_button_cancel() |
---|
41 | button_used.click() |
---|
42 | sleep(2) |
---|
43 | try: |
---|
44 | button_used.click() |
---|
45 | not_found = False |
---|
46 | except: |
---|
47 | not_found = True |
---|
48 | self.assertTrue(not_found) |
---|
49 | |
---|
50 | |
---|
51 | |
---|
52 | |
---|
53 | |
---|
54 | |
---|
55 | |
---|
56 | |
---|
57 | |
---|
58 | |
---|
Note: See
TracBrowser
for help on using the repository browser.