com.atlassian.jira.webtest.framework.impl.selenium.core.ui
Class SeleniumUi

java.lang.Object
  extended by com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware
      extended by com.atlassian.jira.webtest.framework.impl.selenium.core.ui.SeleniumUi
All Implemented Interfaces:
WebTestUi

public class SeleniumUi
extends SeleniumContextAware
implements WebTestUi

Selenium implementation of WebTestUi.

Since:
v4.3

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.webtest.framework.core.ui.WebTestUi
WebTestUi.TargetSelector
 
Field Summary
 
Fields inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware
assertThat, client, context, timeouts
 
Constructor Summary
SeleniumUi(SeleniumContext context)
           
 
Method Summary
 Locator body()
          Locator of the current document's body element
 SeleniumUi clear(String locator)
           
 SeleniumUi pressInBody(com.atlassian.webtest.ui.keys.KeySequence sequence)
          Press a key sequence in the current document's body.
 WebTestUi.TargetSelector switchTo()
          Switch to given window/frame.
 SeleniumUi typeChars(String locator, String chars)
          Selenium-specific method to type sequence of characters in a given locator.
 SeleniumUi typeCharsFast(String locator, String chars)
           Selenium-specific method to type sequence of characters in a given locator.
 SeleniumUi typeInLocator(String locator, com.atlassian.webtest.ui.keys.KeySequence sequence)
          Selenium-specific method to type given KeySequence in a given locator.
 
Methods inherited from class com.atlassian.jira.webtest.framework.impl.selenium.core.SeleniumContextAware
context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeleniumUi

public SeleniumUi(SeleniumContext context)
Method Detail

body

public Locator body()
Description copied from interface: WebTestUi
Locator of the current document's body element

Specified by:
body in interface WebTestUi
Returns:
body element locator on the current page

pressInBody

public SeleniumUi pressInBody(com.atlassian.webtest.ui.keys.KeySequence sequence)
Description copied from interface: WebTestUi
Press a key sequence in the current document's body. Mainly used for invoking keyboard shortcuts.

Specified by:
pressInBody in interface WebTestUi
Parameters:
sequence - shortcut sequence to invoke
Returns:
this UI instance

typeInLocator

public SeleniumUi typeInLocator(String locator,
                                com.atlassian.webtest.ui.keys.KeySequence sequence)
Selenium-specific method to type given KeySequence in a given locator. Relieves tests from using SeleniumTypeWriter directly.

Parameters:
locator - Selenium-style locator (in the 'type=value' form) to type into
sequence - sequence to type
Returns:
this UI instance

clear

public SeleniumUi clear(String locator)

typeChars

public SeleniumUi typeChars(String locator,
                            String chars)
Selenium-specific method to type sequence of characters in a given locator. Relieves tests from using SeleniumTypeWriter directly.

Parameters:
locator - Selenium-style locator (in the 'type=value' form) to type into
chars - character sequence to type
Returns:
this UI instance

typeCharsFast

public SeleniumUi typeCharsFast(String locator,
                                String chars)

Selenium-specific method to type sequence of characters in a given locator. Relieves tests from using SeleniumTypeWriter directly.

Uses TypeMode.INSERT_WITH_EVENT to enter characters faster.

Parameters:
locator - Selenium-style locator (in the 'type=value' form) to type into
chars - character sequence to type
Returns:
this UI instance
See Also:
TypeMode.INSERT_WITH_EVENT

switchTo

public WebTestUi.TargetSelector switchTo()
Description copied from interface: WebTestUi
Switch to given window/frame.

Specified by:
switchTo in interface WebTestUi
Returns:
selector to select target to switch to.


Copyright © 2002-2013 Atlassian. All Rights Reserved.