@Component
public class TextEntryStepDefinitions
extends java.lang.Object
| Constructor and Description |
|---|
TextEntryStepDefinitions() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearElement(java.lang.String alias,
java.lang.String selectorValue)
Clears the contents of an element using simple selection
|
void |
clearElement(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue)
Clears the contents of an element
|
void |
clearHiddenElement(java.lang.String alias,
java.lang.String selectorValue)
Clears the contents of a hidden element using simple selection
|
void |
clearHiddenElement(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue)
Clears the contents of an element
|
void |
populateElementAndSubmitStep(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String contentAlias,
java.lang.String content,
java.lang.String exists)
Populate an element with some text, and submits it.
|
void |
populateElementStep(java.lang.String alias,
java.lang.String selectorValue,
java.lang.String contentAlias,
java.lang.String content,
java.lang.String exists,
java.lang.String empty,
java.lang.Integer delay)
Populate an element with some text with simple selectiom
|
void |
populateElementStep(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String contentAlias,
java.lang.String content,
java.lang.String exists,
java.lang.String empty,
java.lang.Integer delay)
Populate an element with some text
|
void |
populateElementWithAttrStep(java.lang.String attributeNameAlias,
java.lang.String attributeName,
java.lang.String attributeValueAlias,
java.lang.String attributeValue,
java.lang.String contentAlias,
java.lang.String content,
java.lang.String exists,
java.lang.String empty)
Populate an element with some text
|
void |
populateElementWithRandomNumberStep(java.lang.String alias,
java.lang.String selectorValue,
java.lang.String randomStartAlias,
java.lang.String randomStart,
java.lang.String randomEndAlias,
java.lang.String randomEnd,
java.lang.String exists)
Populates an element with a random number
|
void |
populateElementWithRandomNumberStep(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String randomStartAlias,
java.lang.String randomStart,
java.lang.String randomEndAlias,
java.lang.String randomEnd,
java.lang.String exists)
Populates an element with a random number
|
void |
populateHiddenElementAndSubmitStep(java.lang.String alias,
java.lang.String selectorValue,
java.lang.String contentAlias,
java.lang.String content,
java.lang.String exists)
Populate an element with some text, and submits it.
|
void |
populateHiddenElementAndSubmitStep(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String contentAlias,
java.lang.String content,
java.lang.String exists)
Populate an element with some text, and submits it.
|
void |
populateSimpleElementAndSubmitStep(java.lang.String alias,
java.lang.String selectorValue,
java.lang.String contentAlias,
java.lang.String content,
java.lang.String exists)
Populate an element with some text, and submits it.
|
@When(value="^I clear (?:a|an|the) element found by( alias)? \"([^\"]*)\"")
public void clearElement(java.lang.String alias,
java.lang.String selectorValue)
alias - If this word is found in the step, it means the selectorValue is found from the
data set.selectorValue - The value used in conjunction with the selector to match the element. If alias was
set, this value is found from the data set. Otherwise it is a literal value.@When(value="^I clear (?:a|an|the) element with (?:a|an|the) (ID|class|xpath|name|css selector)( alias)? of \"([^\"]*)\"")
public void clearElement(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue)
selector - Either ID, class, xpath, name or css selectoralias - If this word is found in the step, it means the selectorValue is found from the
data set.selectorValue - The value used in conjunction with the selector to match the element. If alias was
set, this value is found from the data set. Otherwise it is a literal value.@When(value="^I clear (?:a|an|the) hidden element found by( alias)? \"([^\"]*)\"")
public void clearHiddenElement(java.lang.String alias,
java.lang.String selectorValue)
alias - If this word is found in the step, it means the selectorValue is found from the
data set.selectorValue - The value used in conjunction with the selector to match the element. If alias was
set, this value is found from the data set. Otherwise it is a literal value.@When(value="^I clear (?:a|an|the) hidden element with (?:a|an|the) (ID|class|xpath|name|css selector)( alias)? of \"([^\"]*)\"")
public void clearHiddenElement(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue)
selector - Either ID, class, xpath, name or css selectoralias - If this word is found in the step, it means the selectorValue is found from the
data set.selectorValue - The value used in conjunction with the selector to match the element. If alias was
set, this value is found from the data set. Otherwise it is a literal value.@When(value="^I populate (?:a|an|the) element found by( alias)? \"([^\"]*)\" with( alias)? \"([^\"]*)\" and submit( if it exists)?$")
public void populateSimpleElementAndSubmitStep(java.lang.String alias,
java.lang.String selectorValue,
java.lang.String contentAlias,
java.lang.String content,
java.lang.String exists)
alias - If this word is found in the step, it means the selectorValue is found from the
data set.selectorValue - The value used in conjunction with the selector to match the element. If alias was
set, this value is found from the data set. Otherwise it is a literal value.contentAlias - If this word is found in the step, it means the content is found from the data
set.content - The content to populate the element with. If contentAlias was set, this value is
found from the data set. Otherwise it is a literal value.exists - If this text is set, an error that would be thrown because the element was not
found is ignored. Essentially setting this text makes this an optional statement.@When(value="^I populate (?:a|an|the) element with (?:a|an|the) (ID|class|xpath|name|css selector)( alias)? of \"([^\"]*)\" with( alias)? \"([^\"]*)\" and submit( if it exists)?$")
public void populateElementAndSubmitStep(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String contentAlias,
java.lang.String content,
java.lang.String exists)
selector - Either ID, class, xpath, name or css selectoralias - If this word is found in the step, it means the selectorValue is found from the
data set.selectorValue - The value used in conjunction with the selector to match the element. If alias was
set, this value is found from the data set. Otherwise it is a literal value.contentAlias - If this word is found in the step, it means the content is found from the data
set.content - The content to populate the element with. If contentAlias was set, this value is
found from the data set. Otherwise it is a literal value.exists - If this text is set, an error that would be thrown because the element was not
found is ignored. Essentially setting this text makes this an optional statement.@When(value="^I populate (?:a|an|the) element found by( alias)? \"([^\"]*)\" with( alias)? \"([^\"]*)\"( if it exists)?( if it is empty)?(?: with a keystroke delay of \"(\\d+)\" milliseconds)?$")
public void populateElementStep(java.lang.String alias,
java.lang.String selectorValue,
java.lang.String contentAlias,
java.lang.String content,
java.lang.String exists,
java.lang.String empty,
java.lang.Integer delay)
alias - If this word is found in the step, it means the selectorValue is found from the
data set.selectorValue - The value used in conjunction with the selector to match the element. If alias was
set, ' this value is found from the data set. Otherwise it is a literal value.contentAlias - If this word is found in the step, it means the content is found from the data
set.content - The content to populate the element with. If contentAlias was set, this value is
found from the data set. Otherwise it is a literal value.exists - If this text is set, an error that would be thrown because the element was not
found is ignored. Essentially setting this text makes this an optional statement.empty - Skips the step if the element is not emptydelay - An optional value that defines how long to wait before each simulated keypress.
This is useful for setting a longer delay fields that perform ajax request in
response to key pressed.@When(value="^I populate (?:a|an|the) element with (?:a|an|the) (ID|class|xpath|name|css selector)( alias)? of \"([^\"]*)\" with( alias)? \"([^\"]*)\"( if it exists)?( if it is empty)?(?: with a keystroke delay of \"(\\d+)\" milliseconds)?$")
public void populateElementStep(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String contentAlias,
java.lang.String content,
java.lang.String exists,
java.lang.String empty,
java.lang.Integer delay)
selector - Either ID, class, xpath, name or css selectoralias - If this word is found in the step, it means the selectorValue is found from the
data set.selectorValue - The value used in conjunction with the selector to match the element. If alias was
set, ' this value is found from the data set. Otherwise it is a literal value.contentAlias - If this word is found in the step, it means the content is found from the data
set.content - The content to populate the element with. If contentAlias was set, this value is
found from the data set. Otherwise it is a literal value.exists - If this text is set, an error that would be thrown because the element was not
found is ignored. Essentially setting this text makes this an optional statement.empty - Skips the step if the element is not emptydelay - An optional value that defines how long to wait before each simulated keypress.
This is useful for setting a longer delay fields that perform ajax request in
response to key pressed.@When(value="^I populate (?:a|an|the) element found by( alias)? \"([^\"]*)\" with a random number between( alias)? \"([^\"]*)\" and( alias)? \"([^\"]*)\"( if it exists)?$")
public void populateElementWithRandomNumberStep(java.lang.String alias,
java.lang.String selectorValue,
java.lang.String randomStartAlias,
java.lang.String randomStart,
java.lang.String randomEndAlias,
java.lang.String randomEnd,
java.lang.String exists)
alias - If this word is found in the step, it means the selectorValue is found from the
data set.selectorValue - The value used in conjunction with the selector to match the element. If alias
was set, this value is found from the data set. Otherwise it is a literal
value.randomStartAlias - If this word is found in the step, it means the randomStart is found from the
data set.randomStart - The start of the range of random numbers to select fromrandomEndAlias - If this word is found in the step, it means the randomEnd is found from the
data set.randomEnd - The end of the range of random numbers to select fromexists - If this text is set, an error that would be thrown because the element was not
found is ignored. Essentially setting this text makes this an optional
statement.@When(value="^I populate (?:a|an|the) element with (?:a|an|the) (ID|class|xpath|name|css selector)( alias)? of \"([^\"]*)\" with a random number between( alias)? \"([^\"]*)\" and( alias)? \"([^\"]*)\"( if it exists)?$")
public void populateElementWithRandomNumberStep(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String randomStartAlias,
java.lang.String randomStart,
java.lang.String randomEndAlias,
java.lang.String randomEnd,
java.lang.String exists)
selector - Either ID, class, xpath, name or css selectoralias - If this word is found in the step, it means the selectorValue is found from the
data set.selectorValue - The value used in conjunction with the selector to match the element. If alias
was set, this value is found from the data set. Otherwise it is a literal
value.randomStartAlias - If this word is found in the step, it means the randomStart is found from the
data set.randomStart - The start of the range of random numbers to select fromrandomEndAlias - If this word is found in the step, it means the randomEnd is found from the
data set.randomEnd - The end of the range of random numbers to select fromexists - If this text is set, an error that would be thrown because the element was not
found is ignored. Essentially setting this text makes this an optional
statement.@When(value="^I populate (?:a|an|the) hidden element found by( alias)? \"([^\"]*)\" with( alias)? \"([^\"]*)\"( if it exists)?$")
public void populateHiddenElementAndSubmitStep(java.lang.String alias,
java.lang.String selectorValue,
java.lang.String contentAlias,
java.lang.String content,
java.lang.String exists)
alias - If this word is found in the step, it means the selectorValue is found from the
data set.selectorValue - The value used in conjunction with the selector to match the element. If alias was
set, ' this value is found from the data set. Otherwise it is a literal value.contentAlias - If this word is found in the step, it means the content is found from the data
set.content - The content to populate the element with. If contentAlias was set, this value is
found from the data set. Otherwise it is a literal value.exists - If this text is set, an error that would be thrown because the element was not
found is ignored. Essentially setting this text makes this an optional statement.@When(value="^I populate (?:a|an|the) hidden element with (?:a|an|the) (ID|class|xpath|name|css selector)( alias)? of \"([^\"]*)\" with( alias)? \"([^\"]*)\"( if it exists)?$")
public void populateHiddenElementAndSubmitStep(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String contentAlias,
java.lang.String content,
java.lang.String exists)
selector - Either ID, class, xpath, name or css selectoralias - If this word is found in the step, it means the selectorValue is found from the
data set.selectorValue - The value used in conjunction with the selector to match the element. If alias was
set, ' this value is found from the data set. Otherwise it is a literal value.contentAlias - If this word is found in the step, it means the content is found from the data
set.content - The content to populate the element with. If contentAlias was set, this value is
found from the data set. Otherwise it is a literal value.exists - If this text is set, an error that would be thrown because the element was not
found is ignored. Essentially setting this text makes this an optional statement.@When(value="^I populate (?:a|an|the) element with (?:a|an|the) attribute( alias)? of \"([^\"]*)\" equal to( alias)? \"([^\"]*)\" with( alias)? \"([^\"]*)\"( if it exists)?( if it is empty)?$")
public void populateElementWithAttrStep(java.lang.String attributeNameAlias,
java.lang.String attributeName,
java.lang.String attributeValueAlias,
java.lang.String attributeValue,
java.lang.String contentAlias,
java.lang.String content,
java.lang.String exists,
java.lang.String empty)
attributeNameAlias - If this word is found in the step, it means the attributeName is found
from the data
set.attributeName - The name of the attribute to match.attributeValueAlias - If this word is found in the step, it means the attributeValue is found
from the data
set.attributeValue - The value of the attribute to matchcontentAlias - If this word is found in the step, it means the content is found from the
data set.content - The content to populate the element withexists - If this text is set, an error that would be thrown because the element was
not found
is ignored. Essentially setting this text makes this an optional statement.empty - If this phrase exists, the step will be skipped if the element is not empty