File: selenium-navigate.py

package info (click to toggle)
cockpit 239-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 67,268 kB
  • sloc: javascript: 245,474; ansic: 72,273; python: 23,634; xml: 6,155; sh: 2,919; makefile: 923; sed: 5
file content (42 lines) | stat: -rwxr-xr-x 1,397 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/python3

# we need to be able to find and import seleniumlib, so add this directory
from testlib_avocado.seleniumlib import SeleniumTest, clickable, visible
import os
import sys

machine_test_dir = os.path.dirname(os.path.abspath(__file__))
if machine_test_dir not in sys.path:
    sys.path.insert(1, machine_test_dir)


class NavigateTestSuite(SeleniumTest):
    """
    :avocado: enable
    """

    def testNavigateNoReload(self):
        self.login()
        # Bring up a dialog on system page
        self.click(self.wait_link('Overview', cond=clickable))
        self.wait_frame("system")
        self.click(self.wait_id('system_information_systime_button', cond=clickable))
        self.wait_id('system_information_change_systime', cond=visible)

        # Check hardware info page
        self.click(self.wait_link('View hardware details', cond=clickable))
        self.mainframe()
        self.wait_frame("hwinfo")
        self.wait_text('BIOS date')
        self.mainframe()

        # Now navigate to the logs
        self.click(self.wait_link('Logs', cond=clickable))
        self.wait_frame("logs")
        self.wait_id("log-filters")
        self.mainframe()

        # Now navigate back to system page
        self.click(self.wait_link('Overview', cond=clickable))
        self.wait_frame("system")
        self.wait_id('system_information_change_systime', cond=visible)