@Component
public class OpenStepDefinitions
extends java.lang.Object
Constructor and Description |
---|
OpenStepDefinitions() |
Modifier and Type | Method and Description |
---|---|
void |
openAllLinks()
Scans the page for all link elements, opens them in new tabs, and then closes the tabs.
|
void |
openApplication(java.lang.String urlName)
Opens up the application with the URL that is mapped to the app attribute in the
<feature>
element in the profile holding the test script. |
void |
openPage(java.lang.String alias,
java.lang.String url)
Opens up the supplied URL.
|
@When(value="^I open the page( alias)? \"([^\"]*)\"$") public void openPage(java.lang.String alias, java.lang.String url)
alias
- include this text if the url is actually an alias to be loaded from the configuration
fileurl
- The URL of the page to open@When(value="^I open the application(?: \"([^\"]*)\")?$") public void openApplication(java.lang.String urlName)
<feature>
element in the profile holding the test script. This is different to the "I open the page
<url>
" step in that the URL that is actually used comes from a list maintained in the
WebAppTesting-Capabilities profile. This means that the same script can be run multiple times against
different URLs. This is usually used when you want to test multiple brands, or multiple feature
branches.
urlName
- The URL name from mappings to load.@When(value="^I open all links in new tabs and then close the tabs$") public void openAllLinks() throws java.lang.InterruptedException
java.lang.InterruptedException
- if interrupted while waiting, in
which case unfinished tasks are cancelled