This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
is_displayed('//div[@id="page_header_div"]//li[contains(@class, "dropdown")]') | |
element('//div[@id="page_header_div"]//li[contains(@class, "dropdown")]') | |
cfme.fixtures.pytest_selenium.elements('//div[@id="page_header_div"]//li[contains(@class, "dropdown")]') | |
browser() | |
-> <selenium.webdriver.chrome.webdriver.WebDriver object at 0x36e7ed0> | |
-> [] | |
-> Message: 'Element //div[@id="page_header_div"]//li[contains(@class, "dropdown")] not found on page.' | |
-> False | |
sleep(1.0) | |
-> None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
login('admin', 'smartvm') | |
logged_in() | |
is_displayed('//div[@id="page_header_div"]//li[contains(@class, "dropdown")]') | |
element('//div[@id="page_header_div"]//li[contains(@class, "dropdown")]') | |
cfme.fixtures.pytest_selenium.elements('//div[@id="page_header_div"]//li[contains(@class, "dropdown")]') | |
browser() | |
-> <selenium.webdriver.chrome.webdriver.WebDriver object at 0x36e7ed0> | |
-> [] | |
-> Message: 'Element //div[@id="page_header_div"]//li[contains(@class, "dropdown")] not found on page.' | |
-> False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- cfme.login.login('admin', 'smartvm') | |
| - cfme.login.logged_in() | |
| | - cfme.fixtures.pytest_selenium.is_displayed('//div[@id="page_header_div"]//li[contains(@class, "dropdown")]') | |
| | | - cfme.fixtures.pytest_selenium.element('//div[@id="page_header_div"]//li[contains(@class, "dropdown")]') | |
| | | | - utils.browser.browser() | |
| | | | -> <selenium.webdriver.chrome.webdriver.WebDriver object at 0x32f4a50> | |
| | | -> Message: 'Element //div[@id="page_header_div"]//li[contains(@class, "dropdown")] not found on page.' | |
| | -> False | |
| -> None | |
| - time.sleep(1.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
from cfme.automate.explorer import Namespace, Class | |
from utils.randomness import generate_random_string | |
pytestmark = [pytest.mark.usefixtures("logged_in")] | |
@pytest.fixture(scope='module') | |
def gen_namespace(): | |
name = generate_random_string(8) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import selenium.webdriver.common.keys as ks | |
sel.send_keys("//div[@class='CodeMirror CodeMirror-focused']/div/textarea", ks.Keys.LEFT_CONTROL + "a") | |
sel.send_keys("//div[@class='CodeMirror CodeMirror-focused']/div/textarea", "foo") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@staticmethod | |
def make_path(*names): | |
'''Make a set of nested Namespace objects with the given path. | |
eg. | |
n = Namespace.make_path("foo", "bar") | |
is equivalent to: | |
n = Namespace(name="bar", parent=Namespace(name="foo")) | |
''' | |
if names: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cfme.fixtures.pytest_selenium as sel | |
reload(sel) | |
sel.ensure_browser_open() | |
import cfme.login as login | |
login.login_admin() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tree path navigation | |
def expand_path(self, *path): | |
""" Clicks through a series of elements in a path. | |
Clicks through a tree, by expanding the levels in a single straight path and | |
returns the final element without clicking it. | |
Args: | |
*path: The path as multiple positional string arguments denoting the course to take. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def exists(self): | |
with error.handler(tree_item_not_found_is_leaf): | |
nav.go_to('automate_explorer_edit', context={'namespace': self}) | |
return True | |
return False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fill(dialog_form, {...}) | |
for tab in tabs: | |
click(plus_button) | |
fill(tab_form, tab) | |
click(add_button) |