-
Notifications
You must be signed in to change notification settings - Fork 35
Actions Reference
Pyccuracy comes with a set of actions that allow the user to control the browser in the most usual ways, like clicking a link or checking if a textbox contains a given text.
If you want to create your own actions you can learn more about it at the “Creating custom Actions” page.
Pyccuracy’s actions are divided in categories according to the element they relate to: element, checkbox, image, link, page, radio, select and textbox.
If you are not sure about the action you are looking for, we always advise you to look the Element actions, because that’s where most of the fun is.
- And I see “some” table as:
| Name | Age | Sex |
| John | 28 | Male |
| Paul | 30 | Male |
This action asserts that the given table matches the one the user specified.
# en-us
(And )I see "table_name" table as:
# pt-br
(E )[eE]u vejo a tabela "table_name" como:
# en-us
^(And )?I see [\"](?P<table_name>.+)[\"] table as:$
# pt-br
^(E )?[eE]u vejo a tabela [\"](?P<table_name>.+)[\"] como:$
Element actions can be used for any registered element (more about registering elements at “Creating custom Pages” section). The majority of Pyccuracy’s actions are in this category, like clicking elements or verifying that they contain a given style.
Whenever you see element_name, it means the name of the registered element or the attribute “name” or “id” of the given element.
Whenever you see [element_type|element_selector] what this means is that you have to use one of the following:
- button
- radio button
- div
- link
- checkbox
- select
- textbox
- image
- paragraph
- ul
- li
- table
- element (only use this if none of the above apply)
- botão
- radio
- div
- link
- checkbox
- select
- caixa de texto
- imagem
- parágrafo
- ul
- li
- tabela
- elemento (só utilize este se nenhum dos outro se aplicar)
- And I do not see “some” button
- And I do not see “other” checkbox
This action asserts that the given element is not visible.
# en-us
(And )I do not see "element_name" [element_type|element selector]
# pt-br
(E )[eE]u não vejo [oa] [element_type|element selector] "element_name"
# en-us
^(And )?I do not see [\"](?P<element_name>.+)[\"] (?P<element_type><element selector>)$
# pt-br
^(E )?[eE]u não vejo [oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"]$
- I see “username” textbox contains “polo”
This action asserts that the text for the given element contains the specified one.
# en-us
(And )I see "element_name" [element_type|element selector] contains "text"
# pt-br
(E )[eE]u vejo que [oa] [element_type|element selector] "element_name" contém "text"
# en-us
^(And )?I see [\"](?P<element_name>[^"]+)[\"] (?P<element_type><element selector>) contains [\"](?P<text>.+)[\"]$
# pt-br
^(E )?[eE]u vejo que [oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"] contém [\"](?P<text>.+)[\"]$
- I see “username” textbox does not contain “polo”
This action asserts that the text for the given element does not contain the specified one.
# en-us
(And )I see "element_name" [element_type|element selector] does not contain "text"
# pt-br
(E )[eE]u vejo que [oa] [element_type|element selector] "element_name" não contém "text"
# en-us
^(And )?I see [\"](?P<element_name>[^"]+)[\"] (?P<element_type><element selector>) does not contain [\"](?P<text>.+)[\"]$
# pt-br
^(E )?[eE]u vejo que [oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"] não contém [\"](?P<text>.+)[\"]$
- And I click “some” button
- And I click “other” checkbox and wait
This action instructs the browser driver to click the given element. If the “and wait” suffix is used, a “Wait for page to load” action is executed after this one.
# en-us
(And )I click "element_name" [element_type|element selector]( and wait)
# pt-br
(E )[eE]u clico n[oa] [element_type|element selector] "element_name"( e espero)
# en-us
^(And )?I click [\"](?P<element_name>[^"]+)[\"] (?P<element_type><element selector>)(?P<should_wait> and wait)?$
# pt-br
^(E )?[eE]u clico n[oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"](?P<should_wait> e espero)?$
- And I see “some” button is disabled
- And I see “other” textbox is disabled
This action asserts that the given element is disabled.
# en-us
(And )I see "element_name" [element_type|element selector] is disabled
# pt-br
(E )[eE]u vejo que [oa] [element_type|element selector] "element_name" está desabilitad[oa]
# en-us
^(And )?I see [\"](?P<element_name>[^"]+)[\"] (?P<element_type><element selector>) is disabled$
# pt-br
^(E )?[eE]u vejo que [oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"] está desabilitad[oa]$
- I see “username” textbox contains “<p>polo</p>” markup
This action asserts that the markup for the given element contains the specified one.
# en-us
(And )I see "element_name" [element_type|element selector] contains "markup" markup
# pt-br
(E )[eE]u vejo que [oa] [element_type|element selector] "element_name" contém o markup "markup"
# en-us
^(And )?I see [\"](?P<element_name>[^"]+)[\"] (?P<element_type><element selector>) contains [\"](?P<markup>.+)[\"] markup$
# pt-br
^(E )?[eE]u vejo que [oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"] contém o markup [\"](?P<markup>.+)[\"]$
- And I see “some” textbox does not have “width” style
- And I see “other” button does not have “visible” style
This action asserts that the given element does not have the given style with any value.
# en-us
(And )I see "element_name" [element_type|element selector] does not have "style_name" style
# pt-br
(E )[eE]u vejo que [ao] [element_type|element selector] "element_name" não contém o estilo "style_name"
# en-us
^(And )?I see [\"](?P<element_name>.+)[\"] (?P<element_type><element selector>) does not have [\"](?P<style_name>.+)[\"] style$
# pt-br
^(E )?[eE]u vejo que [ao] (?P<element_type><element selector>) [\"](?P<element_name>.+)[\"] não contém o estilo [\"](?P<style_name>.+)[\"]$
- I see “username” textbox matches “polo”
This action asserts that the text for the given element does not match exactly the specified one.
# en-us
(And )I see "element_name" [element_type|element selector] does not match "text"
# pt-br
(E )[eE]u vejo que [oa] [element_type|element selector] "element_name" não contém exatamente "text"
# en-us
^(And )?I see [\"](?P<element_name>[^"]+)[\"] (?P<element_type><element selector>) does not match [\"](?P<text>.+)[\"]$
# pt-br
^(E )?[eE]u vejo que [oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"] não contém exatamente [\"](?P<text>.+)[\"]$
- And I mouseout “some” image
This action instructs the browser driver to remove mouse focus from the specified element.
# en-us
(And )I mouseout "element_name" [element_type|element selector]
# pt-br
(E )[eE]u retiro o mouse d[oa] [element_type|element selector] "element_name"
# en-us
^(And )?I mouseout [\"](?P<element_name>[^"]+)[\"] (?P<element_type><element selector>)$
# pt-br
^(E )?[eE]u retiro o mouse d[oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"]$
- I see “username” textbox matches “polo”
This action asserts that the text for the given element matches exactly the specified one.
# en-us
(And )I see "element_name" [element_type|element selector] matches "text"
# pt-br
(E )[eE]u vejo que [oa] [element_type|element selector] "element_name" contém exatamente "text"
# en-us
^(And )?I see [\"](?P<element_name>[^"]+)[\"] (?P<element_type><element selector>) matches [\"](?P<text>.+)[\"]$
# pt-br
^(E )?[eE]u vejo que [oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"] contém exatamente [\"](?P<text>.+)[\"]$
- And I see “some” button
- And I see “other” checkbox
This action asserts that the given element is visible.
# en-us
(And )I see "element_name" [element_type|element selector]
# pt-br
(E )[eE]u vejo [oa] [element_type|element selector] "element_name"
# en-us
^(And )?I see [\"](?P<element_name>.+)[\"] (?P<element_type><element selector>)$
# pt-br
^(E )?[eE]u vejo [oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"]$
- And I see “some” textbox has “width” style
- And I see “other” button has “visible” style
This action asserts that the given element has the given style with any value.
# en-us
(And )I see "element_name" [element_type|element selector] has "style_name" style
# pt-br
(E )[eE]u vejo que [ao] [element_type|element selector] "element_name" contém o estilo "style_name"
# en-us
^(And )?I see [\"](?P<element_name>.+)[\"] (?P<element_type><element selector>) has [\"](?P<style_name>.+)[\"] style$
# pt-br
^(E )?[eE]u vejo que [ao] (?P<element_type><element selector>) [\"](?P<element_name>.+)[\"] contém o estilo [\"](?P<style_name>.+)[\"]$
- I see “username” textbox matches “<p>polo</p>” markup
This action asserts that the markup for the given element matches exactly the specified one.
# en-us
(And )I see "element_name" [element_type|element selector] matches "markup" markup
# pt-br
(E )[eE]u vejo que [oa] [element_type|element selector] "element_name" contém exatamente o markup "markup"
# en-us
^(And )?I see [\"](?P<element_name>[^"]+)[\"] (?P<element_type><element selector>) matches [\"](?P<markup>.+)[\"] markup$
# pt-br
^(E )?[eE]u vejo que [oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"] contém exatamente o markup [\"](?P<markup>.+)[\"]$
- And I mouseover “some” image
This action instructs the browser driver to mouse over the specified element.
# en-us
(And )I mouseover "element_name" [element_type|element selector]
# pt-br
(E )[eE]u passo o mouse n[oa] [element_type|element selector] "element_name"
# en-us
^(And )?I mouseover [\"](?P<element_name>[^"]+)[\"] (?P<element_type><element selector>)$
# pt-br
^(E )?[eE]u passo o mouse n[oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"]$
- I see “username” textbox does not contain “<p>polo</p>” markup
This action asserts that the markup for the given element does not contain the specified one.
# en-us
(And )I see "element_name" [element_type|element selector] does not contain "markup" markup
# pt-br
(E )[eE]u vejo que [oa] [element_type|element selector] "element_name" não contém o markup "markup"
# en-us
^(And )?I see [\"](?P<element_name>[^"]+)[\"] (?P<element_type><element selector>) does not contain [\"](?P<markup>.+)[\"] markup$
# pt-br
^(E )?[eE]u vejo que [oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"] não contém o markup [\"](?P<markup>.+)[\"]$
- I see “username” textbox does not match “<p>polo</p>” markup
This action asserts that the markup for the given element does not match exactly the specified one.
# en-us
(And )I see "element_name" [element_type|element selector] does not match "markup" markup
# pt-br
(E )[eE]u vejo que [oa] [element_type|element selector] "element_name" não contém exatamente o markup "markup"
# en-us
^(And )?I see [\"](?P<element_name>[^"]+)[\"] (?P<element_type><element selector>) does not match [\"](?P<markup>.+)[\"] markup$
# pt-br
^(E )?[eE]u vejo que [oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"] não contém exatamente o markup [\"](?P<markup>.+)[\"]$
- And I wait for “some” button element to disappear
- And I wait for “other” textbox element to disappear for 5 seconds
Waits until a given element disappears (or is not visible already) or times out.
This action is really useful when you have some processing done (maybe AJAX) before an element is dynamically removed or hidden.
# en-us
(And )I wait for "element_name" [element_type|element selector] to disappear( for X seconds)
# pt-br
(E )[eE]u espero [oa] [element_type|element selector] "element_name" desaparecer( por X segundos)
# en-us
^(And )?I wait for [\"](?P<element_name>[^"]+)[\"] (?P<element_type><element selector>) to disappear( for (?P<timeout>\d+) seconds)?$
# pt-br
^(E )?[eE]u espero [oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"] desaparecer( por (?P<timeout>\d+) segundos)?$
- And I see “some” button is enabled
- And I see “other” textbox is enabled
This action asserts that the given element is enabled.
# en-us
(And )I see "element_name" [element_type|element selector] is enabled
# pt-br
(E )[eE]u vejo que [oa] [element_type|element selector] "element_name" está habilitad[oa]
# en-us
^(And )?I see [\"](?P<element_name>[^"]+)[\"] (?P<element_type><element selector>) is enabled$
# pt-br
^(E )?[eE]u vejo que [oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"] está habilitad[oa]$
- And I wait for “some” button element to be present
- And I wait for “other” textbox element to be present for 5 seconds
Waits until a given element appears or times out.
This action is really useful when you have some processing done (maybe AJAX) before an element is dynamically created.
# en-us
(And )I wait for "element_name" [element_type|element selector] to be present( for X seconds)
# pt-br
(E )[eE]u espero [oa] [element_type|element selector] "element_name" aparecer( por X segundos)
# en-us
^(And )?I wait for [\"](?P<element_name>[^"]+)[\"] (?P<element_type><element selector>) to be present( for (?P<timeout>\d+) seconds)?$
# pt-br
^(E )?[eE]u espero [oa] (?P<element_type><element selector>) [\"](?P<element_name>[^"]+)[\"] aparecer( por (?P<timeout>\d+) segundos)?$
I drag the “from_element_name” [from_element_type|element selector] to the “to_element_name” [to_element_type|element selector]
- I drag the “from” div to the “target” div
This action instructs the browser driver to drag the “from” element to the “target” element.
# en-us
(And )I drag the "from_element_name" [from_element_type|element selector] to the "to_element_name" [to_element_type|element selector]
# pt-br
(E )[eE]u arrasto [oa] [from_element_type|element selector] "from_element_name" para [oa] [to_element_type|element selector] "to_element_name"
# en-us
^(And )?I drag the [\"](?P<from_element_name>.+)[\"] (?P<from_element_type><element selector>) to the [\"](?P<to_element_name>.+)[\"] (?P<to_element_type><element selector>)?$
# pt-br
^(E )?[eE]u arrasto [oa] (?P<from_element_type><element selector>) [\"](?P<from_element_name>.+)[\"] para [oa] (?P<to_element_type><element selector>) [\"](?P<to_element_name>[^"]+)[\"]?$
- And I see the “book” checkbox is not checked
This action asserts that the given checkbox is not checked.
# en-us
(And )I see the "checkbox_key" checkbox is not checked
# pt-br
(E )[eE]u vejo que a checkbox "checkbox_key" está desmarcada
# en-us
^(And )?I see the [\"](?P<checkbox_key>.+)[\"] checkbox is not checked$
# pt-br
^(E )?[eE]u vejo que a checkbox [\"](?P<checkbox_key>.+)[\"] está desmarcada$
- And I uncheck the “book” checkbox
This action unchecks the given checkbox.
# en-us
(And )I uncheck the "checkbox_key" checkbox
# pt-br
(E )[eE]u desmarco a checkbox "checkbox_key"
# en-us
^(And )?I uncheck the [\"](?P<checkbox_key>.+)[\"] checkbox$
# pt-br
^(E )?[eE]u desmarco a checkbox [\"](?P<checkbox_key>.+)[\"]$
- And I see the “book” checkbox is checked
This action asserts that the given checkbox is checked.
# en-us
(And )I see the "checkbox_key" checkbox is checked
# pt-br
(E )[eE]u vejo que a checkbox "checkbox_key" está marcada
# en-us
^(And )?I see the [\"](?P<checkbox_key>.+)[\"] checkbox is checked$
# pt-br
^(E )?[eE]u vejo que a checkbox [\"](?P<checkbox_key>.+)[\"] está marcada$
- And I check the “book” checkbox
This action checks the given checkbox.
# en-us
(And )I check the "checkbox_key" checkbox
# pt-br
(E )[eE]u marco a checkbox "checkbox_key"
# en-us
^(And )?I check the [\"](?P<checkbox_key>.+)[\"] checkbox$
# pt-br
^(E )?[eE]u marco a checkbox [\"](?P<checkbox_key>.+)[\"]$
- And I see “sports” select has selected text of “soccer”
This action asserts that the currently selected option in the specified select has the specified text.
# en-us
(And )I see "select_name" select has selected text of "text"
# pt-br
(E )[eE]u vejo que o texto selecionado da select "select_name" é "text"
# en-us
^(And )?I see [\"](?P<select_name>.+)[\"] select has selected text of [\"](?P<text>.+)[\"]$
# pt-br
^(E )?[eE]u vejo que o texto selecionado da select [\"](?P<select_name>.+)[\"] é [\"](?P<text>.+)[\"]$
- And I see “sports” select does not contain an option with text “soccer”
This action asserts that the specified select does not contain any options with the specified text.
# en-us
(And )I see "select_name" select does not contain an option with text "text"
# pt-br
(E )[eE]u vejo que a select "select_name" não contém uma opção com texto "text"
# en-us
^(And )?I see [\"](?P<select_name>.+)[\"] select does not contain an option with text [\"](?P<text>.+)[\"]$
# pt-br
^(E )?[eE]u vejo que a select [\"](?P<select_name>.+)[\"] não contém uma opção com texto [\"](?P<text>.+)[\"]$
- And I see “sports” select contains an option with text “soccer”
This action asserts that the specified select contains at least one option with the specified text.
# en-us
(And )I see "select_name" select contains an option with text "text"
# pt-br
(E )[eE]u vejo que a select "select_name" contém uma opção com texto "text"
# en-us
^(And )?I see [\"](?P<select_name>.+)[\"] select contains an option with text [\"](?P<text>.+)[\"]$
# pt-br
^(E )?[eE]u vejo que a select [\"](?P<select_name>.+)[\"] contém uma opção com texto [\"](?P<text>.+)[\"]$
- And I select the option with text of “soccer” in “sports” select
This action instructs the browser driver to select the option in the specified select with the specified text.
# en-us
(And )I select the option with text of "text" in "select_name" select
# pt-br
(E )[eE]u seleciono o item com texto "text" na select "select_name"
# en-us
^(And )?I select the option with text of [\"](?P<text>.+)[\"] in [\"](?P<select_name>.+)[\"] select$
# pt-br
^(E )?[eE]u seleciono o item com texto [\"](?P<text>.+)[\"] na select [\"](?P<select_name>.+)[\"]$
- And I see “sports” select does not have selected index of 1
This action asserts that the currently selected option in the specified select does not have the specified index.
# en-us
(And )I see "select_name" select does not have selected index of X
# pt-br
(E )[eE]u vejo que o índice selecionado da select "select_name" não é X
# en-us
^(And )?I see [\"](?P<select_name>.+)[\"] select does not have selected index of (?P<index>\d+)$
# pt-br
^(E )?[eE]u vejo que o índice selecionado da select [\"](?P<select_name>.+)[\"] não é (?P<index>\d+)$
- And I see “sports” select has selected value of “1”
This action asserts that the currently selected option in the specified select has the specified value.
# en-us
(And )I see "select_name" select has selected value of "option_value"
# pt-br
(E )[eE]u vejo que o valor selecionado da select "select_name" é "option_value"
# en-us
^(And )?I see [\"](?P<select_name>.+)[\"] select has selected value of [\"](?P<option_value>.+)[\"]$
# pt-br
^(E )?[eE]u vejo que o valor selecionado da select [\"](?P<select_name>.+)[\"] é [\"](?P<option_value>.+)[\"]$
- And I select the option with value of “1” in “sports” select
This action instructs the browser driver to select the option in the specified select that matches the specified value.
# en-us
(And )I select the option with value of "option_value" in "select_name" select
# pt-br
(E )[eE]u seleciono o item com valor "option_value" na select "select_name"
# en-us
^(And )?I select the option with value of [\"](?P<option_value>.+)[\"] in [\"](?P<select_name>.+)[\"] select$
# pt-br
^(E )?[eE]u seleciono o item com valor [\"](?P<option_value>.+)[\"] na select [\"](?P<select_name>.+)[\"]$
- And I see “sports” select does not have selected text of “soccer”
This action asserts that the currently selected option in the specified select does not have the specified text.
# en-us
(And )I see "select_name" select does not have selected text of "text"
# pt-br
(E )[eE]u vejo que o texto selecionado da select "select_name" não é "text"
# en-us
^(And )?I see [\"](?P<select_name>.+)[\"] select does not have selected text of [\"](?P<text>.+)[\"]$
# pt-br
^(E )?[eE]u vejo que o texto selecionado da select [\"](?P<select_name>.+)[\"] não é [\"](?P<text>.+)[\"]$
- And I select the option with index of 1 in “sports” select
This action instructs the browser driver to select the option in the specified select with the specified index.
# en-us
(And )I select the option with index of X in "select_name" select
# pt-br
(E )[eE]u seleciono o item com índice X na select "select_name"
# en-us
^(And )?I select the option with index of (?P<index>\d+) in [\"](?P<select_name>.+)[\"] select$
# pt-br
^(E )?[eE]u seleciono o item com índice (?P<index>\d+) na select [\"](?P<select_name>.+)[\"]$
- And I see “sports” select has selected index of 1
This action asserts that the currently selected option in the specified select has the specified index.
# en-us
(And )I see "select_name" select has selected index of X
# pt-br
(E )[eE]u vejo que o índice selecionado da select "select_name" é X
# en-us
^(And )?I see [\"](?P<select_name>.+)[\"] select has selected index of (?P<index>\d+)$
# pt-br
^(E )?[eE]u vejo que o índice selecionado da select [\"](?P<select_name>.+)[\"] é (?P<index>\d+)$
- And I see “sports” select does not have selected value of “1”
This action asserts that the currently selected option in the specified select does not have the specified value.
# en-us
(And )I see "select_name" select does not have selected value of "value"
# pt-br
(E )[eE]u vejo que o valor selecionado da select "select_name" não é "value"
# en-us
^(And )?I see [\"](?P<select_name>.+)[\"] select does not have selected value of [\"](?P<value>.+)[\"]$
# pt-br
^(E )?[eE]u vejo que o valor selecionado da select [\"](?P<select_name>.+)[\"] não é [\"](?P<value>.+)[\"]$
- And I see the “credit card” radio is checked
This action asserts that the given radio button is checked.
# en-us
(And )I see the "radio_key" radio is checked
# pt-br
(E )[eE]u vejo que a radio "radio_key" está marcada
# en-us
^(And )?I see the [\"](?P<radio_key>.+)[\"] radio is checked$
# pt-br
^(E )?[eE]u vejo que a radio [\"](?P<radio_key>.+)[\"] está marcada$
- And I see the “credit card” radio is not checked
This action asserts that the given radio button is not checked.
# en-us
(And )I see the "radio_key" radio is not checked
# pt-br
(E )[eE]u vejo que a radio "radio_key" está desmarcada
# en-us
^(And )?I see the [\"](?P<radio_key>.+)[\"] radio is not checked$
# pt-br
^(E )?[eE]u vejo que a radio [\"](?P<radio_key>.+)[\"] está desmarcada$
- And I check the “credit card” radio
This action marks the given radio button.
# en-us
(And )I check the "radio_key" radio
# pt-br
(E )[eE]u marco a radio "radio_key"
# en-us
^(And )?I check the [\"](?P<radio_key>.+)[\"] radio$
# pt-br
^(E )?[eE]u marco a radio [\"](?P<radio_key>.+)[\"]$
- And I see “logo” image has src of “images/logo.png”
This action asserts that an image has the given src attribute.
# en-us
(And )I see "image_name" image has src of "src"
# pt-br
(E )[eE]u vejo que a imagem "image_name" tem src de "src"
# en-us
^(And )?I see [\"](?P<image_name>.+)[\"] image has src of [\"](?P<src>.+)[\"]$
# pt-br
^(E )?[eE]u vejo que a imagem [\"](?P<image_name>.+)[\"] tem src de [\"](?P<src>.+)[\"]$
- And I see “logo” image does not have src of “images/logo.png”
This action asserts that an image does not have the given src attribute.
# en-us
(And )I see "image_name" image does not have src of "src"
# pt-br
(E )[eE]u vejo que a imagem "image_name" não tem src de "src"
# en-us
^(And )?I see [\"](?P<image_name>.+)[\"] image does not have src of [\"](?P<src>.+)[\"]$
# pt-br
^(E )?[eE]u vejo que a imagem [\"](?P<image_name>.+)[\"] não tem src de [\"](?P<src>.+)[\"]$
- And I slowly fill “details” textbox with “text”
This action types the given text in the given textbox. The difference between “slowly” typing and the regular typing is that this action raises javascript “key” events (keyUp, keyDown, etc).
# en-us
(And )I slowly fill "textbox_name" textbox with "text"
# pt-br
(E )[eE]u preencho lentamente a caixa de texto "textbox_name" com "text"
# en-us
^(And )?I slowly fill [\"](?P<textbox_name>.+)[\"] textbox with [\"](?P<text>.+)[\"]$
# pt-br
^(E )?[eE]u preencho lentamente a caixa de texto [\"](?P<textbox_name>.+)[\"] com [\"](?P<text>.+)[\"]$
- And I see “username” textbox is empty
This action asserts that the given textbox is empty.
# en-us
(And )I see "textbox_name" textbox is empty
# pt-br
(E )[eE]u vejo que a caixa de texto "textbox_name" está vazia
# en-us
^(And )?I see [\"](?P<textbox_name>.+)[\"] textbox is empty$
# pt-br
^(E )?[eE]u vejo que a caixa de texto [\"](?P<textbox_name>.+)[\"] está vazia$
- And I clean “details” textbox
This action cleans the given textbox (empties any text inside of it).
# en-us
(And )I clean "textbox_name" textbox
# pt-br
(E )[eE]u limpo a caixa de texto "textbox_name"
# en-us
^(And )?I clean [\"](?P<textbox_name>.+)[\"] textbox$
# pt-br
^(E )?[eE]u limpo a caixa de texto [\"](?P<textbox_name>.+)[\"]$
- And I fill “details” textbox with “text”
This action types the given text in the given textbox.
# en-us
(And )I fill "textbox_name" textbox with "text"
# pt-br
(E )[eE]u preencho a caixa de texto "textbox_name" com "text"
# en-us
^(And )?I fill [\"](?P<textbox_name>.+)[\"] textbox with [\"](?P<text>.+)[\"]$
# pt-br
^(E )?[eE]u preencho a caixa de texto [\"](?P<textbox_name>.+)[\"] com [\"](?P<text>.+)[\"]$
- And I see “username” textbox is not empty
This action asserts that the given textbox is not empty.
# en-us
(And )I see "textbox_name" textbox is not empty
# pt-br
(E )[eE]u vejo que a caixa de texto "textbox_name" não está vazia
# en-us
^(And )?I see [\"](?P<textbox_name>.+)[\"] textbox is not empty$
# pt-br
^(E )?[eE]u vejo que a caixa de texto [\"](?P<textbox_name>.+)[\"] não está vazia$
- And I see “logout” link has “/app/logout” href
This action asserts that a link has the given href attribute.
# en-us
(And )I see "link_name" link has "href" href
# pt-br
(E )[eE]u vejo que o link "link_name" tem href "href"
# en-us
^(And )?I see [\"](?P<link_name>.+)[\"] link has [\"](?P<href>.+)[\"] href$
# pt-br
^(E )?[eE]u vejo que o link [\"](?P<link_name>.+)[\"] tem href [\"](?P<href>.+)[\"]$
Page actions are actions that have a specific impact in the browser, like navigating to a different page.
This is a very important category of actions, since almost any single test relies on navigating to a given page.
- And I go to My Custom Page
- And I go to “http://www.google.com”
This action tells Pyccuracy that the current browser driver (Creating a custom Browser Driver) should navigate to the URL that’s registered in the specified page. Other than that, it also changes that current page in Pyccuracy’s context to the specified one. This means that Pyccuracy will start using the registered elements and url in the specified page.
For more information on creating custom pages check the Creating custom Pages page.
If you specify an url directly, Pyccuracy sets the current page to None and you can’t use registered elements. That might make sense for some scenarios, but is the least preferred way of using this action.
This action also issues automatically a wait for page to load action after navigating. This is important to make sure that the following actions work with a properly loaded page.
# en-us
(And )I go to [page|"url"]
# pt-br
(E )[eE]u navego para [page|"url"]
# en-us
^(And )?I go to (?P<url>[\"](([\w:/._-]|\=|\?|\&|\"|\;|\%)+)[\"]|([\w\s_.-]+))$
# pt-br
^(E )?[eE]u navego para (?P<url>[\"](([\w:/._-]|\=|\?|\&|\"|\;|\%)+)[\"]|([\w\s_.-]+))$
- And I see that current page does not contain “<p>expected markup</p>”
This action asserts that the currently loaded page’s mark-up does not contain the given mark-up.
# en-us
(And )I see that current page does not contain "expected_markup"
# pt-br
(E )[eE]u vejo que a página atual não contém "expected_markup"
# en-us
^(And )?I see that current page does not contain [\"\'](?P<expected_markup>.+)[\'\"]$
# pt-br
^(E )?[eE]u vejo que a página atual não contém [\"\'](?P<expected_markup>.+)[\'\"]$
- And I am in My Custom Page
This action tells Pyccuracy that it should change the current page (as far as registered elements and url go) to a given page.
The same rule for direct urls of Go to Page applies to this action.
Other than that, this action does not do anything. The main purpose of this action is responding to some client event or redirect that might have changed the current page without our direct action (like submitting a form that redirects us to a different page).
# en-us
(And )I am in the [page|"url"]
# pt-br
(E )[eE]u estou n[oa] [page|"url"]
# en-us
^(And )?I am in the (?P<url>[\"](([\w:/._-]|\=|\?|\&|\"|\;|\%)+)[\"]|([\w\s_.-]+))$
# pt-br
^(E )?[eE]u estou n[oa] (?P<url>[\"](([\w:/._-]|\=|\?|\&|\"|\;|\%)+)[\"]|([\w\s_.-]+))$
- And I wait for the page to load
- And I wait for the page to load for 5 seconds
This action instructs the browser driver to wait for a given number of seconds for the page to load. If it times out, the test fails.
# en-us
(And )I wait for the page to load( for X seconds)
# pt-br
(E )[eE]u espero a página ser carregada( por X segundos)
# en-us
^(And )?I wait for the page to load( for (?P<timeout>\d+) seconds)?$
# pt-br
^(E )?[eE]u espero a página ser carregada( por (?P<timeout>\d+) segundos)?$
- And I see “whatever” title
This action asserts that the currently loaded page’s title (Browser title) is the specified one.
# en-us
(And )I see "title" title
# pt-br
(E )[eE]u vejo o título "title"
# en-us
^(And )?I see [\"](?P<title>.+)[\"] title$
# pt-br
^(E )?[eE]u vejo o título [\"](?P<title>.+)[\"]$
- And I go to Profile Page of user “name”
- And I go to Config Page for user “name”
- And I go to Search Page with query “apple”, order “desc”, page “10”
This action does the same thing as the “I go to [page]” but allows you to have variable URLs and pass parameters to be included in them. You can pass as many parameters as you want using commas.
For instance, the examples above will access pages with the following URLs (respectively):
- url = “/<user>”
- url = “/config/<user>”
- url = “/search.php?q=<query>&order=<order>&p=<page>”
Parameters will be automatically included in the URL when you call these pages. For more information on creating custom pages check the Creating custom Pages page.
# en-us
(And )I go to page (for|of|with) parameters
# pt-br
(E )[eE]u navego para page (com|da|de|do|para) parameters
# en-us
^(And )?I go to (?P<url>([\w\s_.-]+)) (for|of|with){1} (?P<parameters>.+)$
# pt-br
^(E )?[eE]u navego para (?P<url>([\w\s_.-]+)) (com|da|de|do|para){1} (?P<parameters>.+)$
- And I wait for 5 seconds
- And I wait for 1 second
- And I wait for 3.5 seconds
This action is just a proxy to Python’s time.sleep function. It just hangs for a given number of seconds.
# en-us
(And )I wait for [X|X.X] second[s]
# pt-br
(E )[eE]u espero por [X|X.X] segundo[s]
# en-us
^(And )?I wait for (?P<timeout>\d+([.]\d+)?) second[s]?$
# pt-br
^(E )?[eE]u espero por (?P<timeout>\d+([.]\d+)?) segundo[s]?$
- And I see that current page contains “<p>expected markup</p>”
This action asserts that the currently loaded page’s mark-up contains the given mark-up.
# en-us
(And )I see that current page contains "expected_markup"
# pt-br
(E )[eE]u vejo que a página atual contém "expected_markup"
# en-us
^(And )?I see that current page contains [\"\'](?P<expected_markup>.+)[\'\"]$
# pt-br
^(E )?[eE]u vejo que a página atual contém [\"\'](?P<expected_markup>.+)[\'\"]$