Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #152 from golemhq/refactor_gui
Browse files Browse the repository at this point in the history
Refactor gui
  • Loading branch information
luciano-renzi authored Dec 5, 2018
2 parents 71d4da2 + c456656 commit b26f29f
Show file tree
Hide file tree
Showing 57 changed files with 2,649 additions and 2,920 deletions.
4 changes: 3 additions & 1 deletion docs/source/golem-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,9 @@ Wait for element to not have attribute

### wait_for_element_not_displayed(element, timeout=30)

Wait for element to be not displayed
Wait for element to be not displayed.
When element is not displayed this is ignored.
When element is not present this will raise ElementNotFound.

### wait_for_element_not_enabled(element, timeout=30)

Expand Down
6 changes: 4 additions & 2 deletions docs/source/golem_public_api/webdriver-class.md
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,9 @@ driver.wait_for_element_has_not_attribute('#someId', 'onclick', 5)

#### **wait_for_element_not_displayed**(element, timeout) <small>[Golem]</small>

Wait for element to be not displayed
Wait for element to be not displayed.
When element is not displayed this is ignored.
When element is not present this will raise ElementNotFound.

Args:
* element: an element tuple, a CSS string or a WebElement object
Expand All @@ -750,7 +752,7 @@ Args:

#### **wait_for_element_not_present**(element, timeout) <small>[Golem]</small>

Wait for element present in the DOM
Wait for element not present in the DOM

Args:
* element: an element tuple, a CSS string or a WebElement object
Expand Down
18 changes: 10 additions & 8 deletions golem/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,9 @@ def assert_page_contains_text(text):
Parameters:
text : value
"""
_add_step("Verify '{}' is present in page".format(text))
_add_step("Assert '{}' is present in the page".format(text))
_run_wait_hook()
assert text in get_browser().page_source, "text '{}' not found in page".format(text)
assert text in get_browser().page_source, "text '{}' not found in the page".format(text)
_screenshot_on_step()


Expand All @@ -633,9 +633,9 @@ def assert_page_not_contains_text(text):
Parameters:
text : value
"""
_add_step("Assert '{}' is not present in page".format(text))
_add_step("Assert '{}' is not present in the page".format(text))
_run_wait_hook()
assert text not in get_browser().page_source, "text '{}' was found in page".format(text)
assert text not in get_browser().page_source, "text '{}' was found in the page".format(text)
_screenshot_on_step()


Expand Down Expand Up @@ -2235,8 +2235,8 @@ def verify_page_contains_text(text):
Parameters:
text : value
"""
with _verify_step("Verify '{}' is present in page".format(text)) as s:
s.error = "text '{}' not found in page".format(text)
with _verify_step("Verify '{}' is present in the page".format(text)) as s:
s.error = "text '{}' not found in the page".format(text)
s.condition = text in get_browser().page_source


Expand All @@ -2246,8 +2246,8 @@ def verify_page_not_contains_text(text):
Parameters:
text : value
"""
with _verify_step("Verify '{}' is not present in page".format(text)) as s:
s.error = "text '{}' was found in page".format(text)
with _verify_step("Verify '{}' is not present in the page".format(text)) as s:
s.error = "text '{}' was found in the page".format(text)
s.condition = text not in get_browser().page_source


Expand Down Expand Up @@ -2560,6 +2560,8 @@ def wait_for_element_has_not_attribute(element, attribute, timeout=30):

def wait_for_element_not_displayed(element, timeout=30):
"""Wait for element to be not displayed
When element is not displayed this is ignored.
When element is not present this will raise ElementNotFound.
Parameters:
element : element
Expand Down
2 changes: 1 addition & 1 deletion golem/cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def run_command(project='', test_query='', browsers=None, processes=1,
for project in utils.get_projects(test_execution.root_path):
print(' {}'.format(project))

8

def gui_command(port=5000):
gui_start.run_gui(port)

Expand Down
Loading

0 comments on commit b26f29f

Please sign in to comment.