@Component
public class WaitStepDefinitions
extends java.lang.Object
Constructor and Description |
---|
WaitStepDefinitions() |
Modifier and Type | Method and Description |
---|---|
void |
clickWaitStep(java.lang.String waitDuration,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String ignoringTimeout)
Waits the given amount of time for an element to be clickable on the page.
|
void |
clickWaitStep(java.lang.String waitDuration,
java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String ignoringTimeout)
Waits the given amount of time for an element to be clickable on the page.
|
void |
displayAttrWait(java.lang.String waitDuration,
java.lang.String attribute,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String ignoringTimeout)
Waits the given amount of time for an element with the supplied attribute and attribute value to be displayed
(i.e.
|
void |
displaySimpleWaitStep(java.lang.String waitDuration,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String ignoringTimeout)
Waits the given amount of time for an element to be displayed (i.e.
|
void |
displayWaitStep(java.lang.String waitDuration,
java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String ignoringTimeout)
Waits the given amount of time for an element to be displayed (i.e.
|
void |
notDisplayAttrWait(java.lang.String waitDuration,
java.lang.String attribute,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String ignoringTimeout)
Waits the given amount of time for an element with the supplied attribute and attribute value to be displayed
(i.e.
|
void |
notDisplaySimpleWaitStep(java.lang.String waitDuration,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String ignoringTimeout)
Waits the given amount of time for an element to not be displayed (i.e.
|
void |
notDisplayWaitStep(java.lang.String waitDuration,
java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String ignoringTimeout)
Waits the given amount of time for an element to be displayed (i.e.
|
void |
notPresentAttrWait(java.lang.String waitDuration,
java.lang.String attribute,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String ignoringTimeout)
Waits the given amount of time for an element with the supplied attribute and attribute value to be displayed
(i.e.
|
void |
notPresentLinkStep(java.lang.String waitDuration,
java.lang.String alias,
java.lang.String linkContent,
java.lang.String ignoringTimeout)
Waits the given amount of time for a link with the supplied text to be placed in the DOM.
|
void |
notPresentSimpleWaitStep(java.lang.String waitDuration,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String ignoringTimeout)
Waits the given amount of time for an element to not be placed in the DOM.
|
void |
notPresentWaitStep(java.lang.String waitDuration,
java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String ignoringTimeout)
Waits the given amount of time for an element to be placed in the DOM.
|
void |
presentAttrWait(java.lang.String waitDuration,
java.lang.String attribute,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String ignoringTimeout)
Waits the given amount of time for an element with the supplied attribute and attribute value to be displayed
(i.e.
|
void |
presentLinkStep(java.lang.String waitDuration,
java.lang.String alias,
java.lang.String linkContent,
java.lang.String ignoringTimeout)
Waits the given amount of time for a link with the supplied text to be placed in the DOM.
|
void |
presentSimpleWaitStep(java.lang.String waitDuration,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String ignoringTimeout)
Waits the given amount of time for an element to be placed in the DOM.
|
void |
presentWaitStep(java.lang.String waitDuration,
java.lang.String selector,
java.lang.String alias,
java.lang.String selectorValue,
java.lang.String ignoringTimeout)
Waits the given amount of time for an element to be placed in the DOM.
|
void |
sleepStep(java.lang.String sleepDuration)
Pauses the execution of the test script for the given number of seconds
|
void |
verifyPageContent(java.lang.Integer wait,
java.lang.String alias,
java.lang.String text)
Waits a period of time for the presence of some text on the page.
|
void |
verifyPageRegexContent(java.lang.Integer wait,
java.lang.String alias,
java.lang.String text)
Waits a period of time for the presence of some text matching a regular expression on the page.
|
void |
waitForAlert(java.lang.Integer waitDuration,
java.lang.String ignoringTimeout)
Waits a period of time for the presence of a alert.
|
@When(value="^I (?:wait|sleep) for \"(\\d+)\" second(?:s?)$") public void sleepStep(java.lang.String sleepDuration)
sleepDuration
- The number of seconds to pause the script for@When(value="^I wait \"(\\d+)\" seconds for (?:a|an|the) element found by( alias)? \"([^\"]*)\" to be displayed(,? ignoring timeouts?)?") public void displaySimpleWaitStep(java.lang.String waitDuration, java.lang.String alias, java.lang.String selectorValue, java.lang.String ignoringTimeout)
This is most useful when waiting for a page to load completely. You can use this step to pause the script until some known element is visible, which is a good indication that the page has loaded completely.
waitDuration
- The maximum amount of time to wait foralias
- 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.ignoringTimeout
- include this text to continue the script in the event that the element can't be
found@When(value="^I wait \"(\\d+)\" seconds for (?:a|an|the) element found by( alias)? \"([^\"]*)\" to not be displayed(,? ignoring timeouts?)?") public void notDisplaySimpleWaitStep(java.lang.String waitDuration, java.lang.String alias, java.lang.String selectorValue, java.lang.String ignoringTimeout)
This is most useful when waiting for a page to load completely. You can use this step to pause the script until some known element is visible, which is a good indication that the page has loaded completely.
waitDuration
- The maximum amount of time to wait foralias
- 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.ignoringTimeout
- include this text to continue the script in the event that the element can't be
found@When(value="^I wait \"(\\d+)\" seconds for (?:a|an|the) element with (?:a|an|the) (ID|class|xpath|name|css selector)( alias)? of \"([^\"]*)\" to be displayed(,? ignoring timeouts?)?") public void displayWaitStep(java.lang.String waitDuration, java.lang.String selector, java.lang.String alias, java.lang.String selectorValue, java.lang.String ignoringTimeout)
This is most useful when waiting for a page to load completely. You can use this step to pause the script until some known element is visible, which is a good indication that the page has loaded completely.
waitDuration
- The maximum amount of time to wait forselector
- 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.ignoringTimeout
- include this text to continue the script in the event that the element can't be
found@When(value="^I wait \"(\\d+)\" seconds for (?:a|an|the) element with (?:a|an|the) (ID|class|xpath|name|css selector)( alias)? of \"([^\"]*)\" to not be displayed(,? ignoring timeouts?)?") public void notDisplayWaitStep(java.lang.String waitDuration, java.lang.String selector, java.lang.String alias, java.lang.String selectorValue, java.lang.String ignoringTimeout)
This is most useful when waiting for a page to load completely. You can use this step to pause the script until some known element is visible, which is a good indication that the page has loaded completely.
waitDuration
- The maximum amount of time to wait forselector
- 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.ignoringTimeout
- include this text to continue the script in the event that the element can't be
found@When(value="^I wait \"(\\d+)\" seconds for (?:a|an|the) element found by( alias)? \"([^\"]*)\" to be clickable(,? ignoring timeouts?)?") public void clickWaitStep(java.lang.String waitDuration, java.lang.String alias, java.lang.String selectorValue, java.lang.String ignoringTimeout)
This is most useful when waiting for an element to be in a state where it can be interacted with.
waitDuration
- The maximum amount of time to wait foralias
- 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.ignoringTimeout
- include this text to continue the script in the event that the element can't be
found@When(value="^I wait \"(\\d+)\" seconds for (?:a|an|the) element with (?:a|an|the) (ID|class|xpath|name|css selector)( alias)? of \"([^\"]*)\" to be clickable(,? ignoring timeouts?)?") public void clickWaitStep(java.lang.String waitDuration, java.lang.String selector, java.lang.String alias, java.lang.String selectorValue, java.lang.String ignoringTimeout)
This is most useful when waiting for an element to be in a state where it can be interacted with.
waitDuration
- The maximum amount of time to wait forselector
- 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.ignoringTimeout
- include this text to continue the script in the event that the element can't be
found@When(value="^I wait \"(\\d+)\" seconds for (?:a|an|the) element found by( alias)? \"([^\"]*)\" to be present(,? ignoring timeouts?)?") public void presentSimpleWaitStep(java.lang.String waitDuration, java.lang.String alias, java.lang.String selectorValue, java.lang.String ignoringTimeout)
This is most useful when waiting for a page to load completely. You can use this step to pause the script until some known element is visible, which is a good indication that the page has loaded completely.
waitDuration
- The maximum amount of time to wait foralias
- 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.ignoringTimeout
- Include this text to ignore a timeout while waiting for the element to be
present@When(value="^I wait \"(\\d+)\" seconds for (?:a|an|the) element found by( alias)? \"([^\"]*)\" to not be present(,? ignoring timeouts?)?") public void notPresentSimpleWaitStep(java.lang.String waitDuration, java.lang.String alias, java.lang.String selectorValue, java.lang.String ignoringTimeout)
This is most useful when waiting for loading element in the page to be removed. You can use this step to pause the script until some known element is not longer visible.
waitDuration
- The maximum amount of time to wait foralias
- 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.ignoringTimeout
- Include this text to ignore a timeout while waiting for the element to be
present@When(value="^I wait \"(\\d+)\" seconds for (?:a|an|the) element with (?:a|an|the) (ID|class|xpath|name|css selector)( alias)? of \"([^\"]*)\" to be present(,? ignoring timeouts?)?") public void presentWaitStep(java.lang.String waitDuration, java.lang.String selector, java.lang.String alias, java.lang.String selectorValue, java.lang.String ignoringTimeout)
This is most useful when waiting for a page to load completely. You can use this step to pause the script until some known element is visible, which is a good indication that the page has loaded completely.
waitDuration
- The maximum amount of time to wait forselector
- 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.ignoringTimeout
- Include this text to ignore a timeout while waiting for the element to be
present@When(value="^I wait \"(\\d+)\" seconds for (?:a|an|the) element with (?:a|an|the) (ID|class|xpath|name|css selector)( alias)? of \"([^\"]*)\" to not be present(,? ignoring timeouts?)?") public void notPresentWaitStep(java.lang.String waitDuration, java.lang.String selector, java.lang.String alias, java.lang.String selectorValue, java.lang.String ignoringTimeout)
This is most useful when waiting for a page to load completely. You can use this step to pause the script until some known element is visible, which is a good indication that the page has loaded completely.
waitDuration
- The maximum amount of time to wait forselector
- 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.ignoringTimeout
- Include this text to ignore a timeout while waiting for the element to be
present@When(value="^I wait \"(\\d+)\" seconds for a link with the text content of( alias) \"([^\"]*)\" to be present(,? ignoring timeouts?)?") public void presentLinkStep(java.lang.String waitDuration, java.lang.String alias, java.lang.String linkContent, java.lang.String ignoringTimeout)
waitDuration
- The maximum amount of time to wait foralias
- 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 wait forignoringTimeout
- The presence of this text indicates that timeouts are ignored@When(value="^I wait \"(\\d+)\" seconds for a link with the text content of( alias) \"([^\"]*)\" to not be present(,? ignoring timeouts?)?") public void notPresentLinkStep(java.lang.String waitDuration, java.lang.String alias, java.lang.String linkContent, java.lang.String ignoringTimeout)
waitDuration
- The maximum amount of time to wait foralias
- 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 wait forignoringTimeout
- The presence of this text indicates that timeouts are ignored@When(value="^I wait \"(\\d+)\" seconds for (?:a|an|the) element with (?:a|an|the) attribute of \"([^\"]*)\" equal to( alias)? \"([^\"]*)\" to be displayed(,? ignoring timeouts?)?") public void displayAttrWait(java.lang.String waitDuration, java.lang.String attribute, java.lang.String alias, java.lang.String selectorValue, java.lang.String ignoringTimeout)
waitDuration
- The maximum amount of time to wait forattribute
- The attribute to use to select the element withalias
- 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.ignoringTimeout
- Include this text to ignore a timeout while waiting for the element to be present@When(value="^I wait \"(\\d+)\" seconds for (?:a|an|the) element with (?:a|an|the) attribute of \"([^\"]*)\" equal to( alias)? \"([^\"]*)\" to not be displayed(,? ignoring timeouts?)?") public void notDisplayAttrWait(java.lang.String waitDuration, java.lang.String attribute, java.lang.String alias, java.lang.String selectorValue, java.lang.String ignoringTimeout)
waitDuration
- The maximum amount of time to wait forattribute
- The attribute to use to select the element withalias
- 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.ignoringTimeout
- Include this text to ignore a timeout while waiting for the element to be present@When(value="^I wait \"(\\d+)\" seconds for (?:a|an|the) element with (?:a|an|the) attribute of \"([^\"]*)\" equal to( alias)? \"([^\"]*)\" to be present(,? ignoring timeouts?)?") public void presentAttrWait(java.lang.String waitDuration, java.lang.String attribute, java.lang.String alias, java.lang.String selectorValue, java.lang.String ignoringTimeout)
waitDuration
- The maximum amount of time to wait forattribute
- The attribute to use to select the element withalias
- 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.ignoringTimeout
- Include this text to ignore a timeout while waiting for the element to be present@When(value="^I wait \"(\\d+)\" seconds for (?:a|an|the) element with (?:a|an|the) attribute of \"([^\"]*)\" equal to( alias)? \"([^\"]*)\" to not be present(,? ignoring timeouts?)?") public void notPresentAttrWait(java.lang.String waitDuration, java.lang.String attribute, java.lang.String alias, java.lang.String selectorValue, java.lang.String ignoringTimeout)
waitDuration
- The maximum amount of time to wait forattribute
- The attribute to use to select the element withalias
- 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.ignoringTimeout
- Include this text to ignore a timeout while waiting for the element to be present@Then(value="^I wait \"(\\d+)\" seconds for the page to contain the text( alias)? \"(.*?)\"") public void verifyPageContent(java.lang.Integer wait, java.lang.String alias, java.lang.String text) throws java.lang.InterruptedException
wait
- The maximum amount of time to wait foralias
- This text appears if the text is astucally an alias keytext
- The text to find on the page, or the alias to the textjava.lang.InterruptedException
- Thread.sleep was interrupted@Then(value="^I wait \"(\\d+)\" seconds for the page to contain the regex( alias)? \"(.*?)\"") public void verifyPageRegexContent(java.lang.Integer wait, java.lang.String alias, java.lang.String text) throws java.lang.InterruptedException
wait
- The maximum amount of time to wait foralias
- This text appears if the text is astucally an alias keytext
- The text to find on the page, or the alias to the textjava.lang.InterruptedException
- Thread.sleep was interrupted@Then(value="^I wait \"(\\d+)\" seconds for an alert to be displayed(,? ignoring timeouts?)?$") public void waitForAlert(java.lang.Integer waitDuration, java.lang.String ignoringTimeout)
waitDuration
- The maximum amount of time to wait for