@Component
public class TabAndWindowStepDefinition
extends java.lang.Object
Constructor and Description |
---|
TabAndWindowStepDefinition() |
Modifier and Type | Method and Description |
---|---|
void |
closeWindow(java.lang.String ignoreErrors)
Switchs to the specified window.
|
void |
maximiseWindow()
Maximise the browser window
|
void |
setWindowSize(java.lang.Integer width,
java.lang.Integer height)
Sets the dimensions of the browser window.
|
void |
switchTabs(java.lang.String tabIndex)
Switchs to the specified tab.
|
void |
switchWindows(java.lang.String ignoreErrors)
Switchs to the specified window.
|
@When(value="I switch to tab \"(\\d+)\"$") public void switchTabs(java.lang.String tabIndex)
tabIndex
- The index of the new tab. Usually 1 (the original tab will be 0)@When(value="I switch to the new window( ignoring errors)?") public void switchWindows(java.lang.String ignoreErrors)
ignoreErrors
- ignore any errors@When(value="I close the current window( ignoring errors)?") public void closeWindow(java.lang.String ignoreErrors)
ignoreErrors
- ignore any errors@When(value="I maximi(?:s|z)e the window") public void maximiseWindow()
@When(value="I set the window size to \"(\\d+)x(\\d+)\"") public void setWindowSize(java.lang.Integer width, java.lang.Integer height)
width
- The width of the browser windowheight
- The height of the browser window