@Component
public class ClickingStepDefinitions
extends java.lang.Object
| Constructor and Description |
|---|
ClickingStepDefinitions() |
| Modifier and Type | Method and Description |
|---|---|
void |
clickCancelOnAlert(java.lang.String exists)
Clicks cancel on the alert
|
void |
clickElementSimpleStep(java.lang.String alias,
java.lang.String selectorValue,
java.lang.String exists)
A simplified step that will click on an element found by ID attribute, name attribue,
class attribute, xpath or CSS selector.
|
void |
clickElementStep(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String exists)
Clicks on an element
|
void |
clickElementWithAttrStep(java.lang.String attributeNameAlias,
java.lang.String attributeName,
java.lang.String attributeValueAlias,
java.lang.String attributeValue,
java.lang.String exists)
Clicks an element on the page selected via its attributes
|
void |
clickElementWithRandomNumberStep(java.lang.String attributeNameAlias,
java.lang.String attributeName,
java.lang.String randomStartAlias,
java.lang.String randomStart,
java.lang.String randomEndAlias,
java.lang.String randomEnd,
java.lang.String exists)
Clicks on an element with a random number
|
void |
clickHiddenElementStep(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String exists)
Clicks on an element that may or may not be visible on the page
|
void |
clickHiddenLinkStep(java.lang.String alias,
java.lang.String linkContent,
java.lang.String exists)
Clicks a link that may or may not be visible on the page
|
void |
clickInElement(java.lang.String event,
java.lang.Float xAxis,
java.lang.Float yAxis,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String exists)
Clicks within the area of an element.
|
void |
clickLinkStep(java.lang.String alias,
java.lang.String linkContent,
java.lang.String exists)
Clicks a link on the page
|
void |
clickOKOnAlert(java.lang.String exists)
Clicks ok on the alert
|
void |
clickSimpleHiddenElementStep(java.lang.String alias,
java.lang.String selectorValue,
java.lang.String exists)
Selects an element with simplified selection and clicks on an it regardless of wether is
is or is not be visible on the page
|
@When(value="^I click (?:a|an|the) element found by( alias)? \"([^\"]*)\"( if it exists)?$")
public void clickElementSimpleStep(java.lang.String alias,
java.lang.String selectorValue,
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.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 click (?:a|an|the) element with (?:a|an|the) (ID|class|xpath|name|css selector)( alias)? of \"([^\"]*)\"( if it exists)?$")
public void clickElementStep(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
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.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 click (?:a|an|the) hidden element found by( alias)? \"([^\"]*)\"( if it exists)?$")
public void clickSimpleHiddenElementStep(java.lang.String alias,
java.lang.String selectorValue,
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.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 click (?:a|an|the) hidden element with (?:a|an|the) (ID|class|xpath|name|css selector)( alias)? of \"([^\"]*)\"( if it exists)?$")
public void clickHiddenElementStep(java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
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.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 click (?:a|an|the) link with the text content of( alias)? \"([^\"]*)\"( if it exists)?$")
public void clickLinkStep(java.lang.String alias,
java.lang.String linkContent,
java.lang.String exists)
alias - If this word is found in the step, it means the linkContent is found from the data
set.linkContent - The text content of the link we are clickingexists - 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 click (?:a|an|the) hidden link with the text content( alias)? of \"([^\"]*)\"( if it exists)?$")
public void clickHiddenLinkStep(java.lang.String alias,
java.lang.String linkContent,
java.lang.String exists)
alias - If this word is found in the step, it means the linkContent is found from the data
set.linkContent - The text content of the link we are clickingexists - 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 click (?:a|an|the) element with (?:a|an|the) attribute( alias)? of \"([^\"]*)\" with a random number between( alias)? \"([^\"]*)\" and( alias)? \"([^\"]*)\"( if it exists)?$")
public void clickElementWithRandomNumberStep(java.lang.String attributeNameAlias,
java.lang.String attributeName,
java.lang.String randomStartAlias,
java.lang.String randomStart,
java.lang.String randomEndAlias,
java.lang.String randomEnd,
java.lang.String exists)
attributeName - Either ID, class, xpath, name or css selectorattributeNameAlias - If this word is found in the step, it means the selectorValue is found
from the data set.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 click (?:a|an|the) element with (?:a|an|the) attribute( alias)? of \"([^\"]*)\" equal to( alias)? \"([^\"]*)\"( if it exists)?$")
public void clickElementWithAttrStep(java.lang.String attributeNameAlias,
java.lang.String attributeName,
java.lang.String attributeValueAlias,
java.lang.String attributeValue,
java.lang.String exists)
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 matchexists - 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 click \"OK\" on the alert( if it exists)?$") public void clickOKOnAlert(java.lang.String exists)
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 click \"Cancel\" on the alert( if it exists)?$") public void clickCancelOnAlert(java.lang.String exists)
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 \"(click|mousedown|mouseup|mouseover|mouseout|mousemove|dblclick)\" \"(\\d+(?:\\.\\d+)?)%\" horizontally and \"(\\d+(?:\\.\\d+)?)%\" vertically within the area of (?:a|an|the) element found by( alias)? \"([^\"]*)\"( if it exists)?$")
public void clickInElement(java.lang.String event,
java.lang.Float xAxis,
java.lang.Float yAxis,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String exists)
event - The kind of mouse event to triggerxAxis - The horizontal percentage within the element area to clickyAxis - The vertical percentage within the element area to clickalias - Include this to force the selector to reference an aliasselectorValue - The selectorexists - Include this to ignore errors caused by missing elements