class WebEnvContext extends EnvContext
Manages the web context and environment bindings.
- Alphabetic
- By Inheritance
- WebEnvContext
- EnvContext
- TemplateSupport
- DecodingSupport
- ScriptSupport
- SQLSupport
- JsonPathSupport
- XPathSupport
- RegexSupport
- InterpolationSupport
- LazyLogging
- Evaluatable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new WebEnvContext(options: GwenOptions)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
addAttachment(name: String, extension: String, content: String): (String, File)
- Definition Classes
- EnvContext
-
def
addBehavior(behavior: dsl.BehaviorType.Value): dsl.BehaviorType.Value
- Definition Classes
- EnvContext
-
def
addErrorAttachments(failure: Failed): Unit
Add a list of error attachments which includes the current screenshot and all current error attachments.
Add a list of error attachments which includes the current screenshot and all current error attachments.
- failure
the failed status
- Definition Classes
- WebEnvContext → EnvContext
-
def
addForeachStepDef(step: Step, stepDef: Scenario): Unit
- Definition Classes
- EnvContext
-
def
addScope(name: String): ScopedData
- Definition Classes
- EnvContext
-
def
addStepDef(stepDef: Scenario): Unit
- Definition Classes
- EnvContext
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asString: String
- Definition Classes
- EnvContext
-
def
bindAndWait(element: String, action: String, value: String): Unit
Binds the given element and value to a given action (element/action=value) and then waits for any bound post conditions to be satisfied.
Binds the given element and value to a given action (element/action=value) and then waits for any bound post conditions to be satisfied.
- element
the element to bind the value to
- action
the action to bind the value to
- value
the value to bind
- def boundAttributeOrSelection(element: String, selection: Option[String]): () ⇒ String
-
def
clone[T <: EnvContext](engine: EvalEngine[T]): T
- Definition Classes
- EnvContext
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
close(): Unit
Closes the current web context.
Closes the current web context.
- Definition Classes
- WebEnvContext → EnvContext
-
def
compare(name: String, expected: String, actual: () ⇒ String, operator: String, negate: Boolean): Unit
Gets the actual value of an attribute and compares it with an expected value or condition.
Gets the actual value of an attribute and compares it with an expected value or condition.
- name
the name of the attribute being compared
- expected
the expected value, regex, xpath, or json path
- actual
the actual value of the element
- operator
the comparison operator
- negate
true to negate the result
- returns
true if the actual value matches the expected value
-
def
compare(sourceName: String, expected: String, actual: String, operator: String, negate: Boolean): Try[Boolean]
- Definition Classes
- EnvContext
-
def
currentBehavior: Option[dsl.BehaviorType.Value]
- Definition Classes
- EnvContext
-
def
decodeBase64(source: String): String
- Definition Classes
- DecodingSupport
-
def
dsl: List[String]
Adds web engine dsl steps to super implementation.
Adds web engine dsl steps to super implementation. The entries returned by this method are used for tab completion in the REPL.
- Definition Classes
- WebEnvContext → EnvContext
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
evaluate[U](dryValue: ⇒ U)(function: ⇒ U): U
- Definition Classes
- Evaluatable
-
def
evaluateJS(javascript: String, params: Any*): Any
Executes a javascript expression on the current page through the web driver.
Executes a javascript expression on the current page through the web driver.
- javascript
the script expression to execute
- params
optional parameters to the script
- Definition Classes
- WebEnvContext → ScriptSupport
-
def
evaluateJSPredicate(javascript: String, params: Any*): Boolean
- Definition Classes
- ScriptSupport
-
def
evaluateJsonPath(jsonpath: String, source: String): String
- Definition Classes
- JsonPathSupport
-
def
evaluateXPath(xpath: String, source: String, targetType: eval.support.XPathSupport.XMLNodeType.Value): String
- Definition Classes
- XPathSupport
-
def
executeSQLQuery(sql: String, database: String): String
- Definition Classes
- SQLSupport
-
def
executeSQLUpdate(sql: String, database: String): Int
- Definition Classes
- SQLSupport
-
def
extractByRegex(regex: String, source: String): String
- Definition Classes
- RegexSupport
-
def
filterAtts(pred: ((String, String)) ⇒ Boolean): ScopedDataStack
- Definition Classes
- EnvContext
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
formatJSReturn(javascript: String): String
Appends a return keyword in front of the given javascript expression in preparation for execute-with-return (since web driver requires return prefix).
Appends a return keyword in front of the given javascript expression in preparation for execute-with-return (since web driver requires return prefix).
- javascript
the javascript function
- Definition Classes
- WebEnvContext → ScriptSupport
-
def
getAttribute(name: String): String
Resolves a bound attribute value from the visible scope.
Resolves a bound attribute value from the visible scope.
- name
the name of the bound attribute to find
-
def
getBoundReferenceValue(name: String): String
Gets a bound value from memory.
Gets a bound value from memory. A search for the value is made in the following order and the first value found is returned:
- Web element text on the current page
- Currently active page scope
- The top scope
- Settings
- name
the name of the bound value to find
- Definition Classes
- WebEnvContext → EnvContext
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
getForeachStepDef(step: Step): Option[Scenario]
- Definition Classes
- EnvContext
-
def
getLocatorBinding(element: String, optional: Boolean): Option[LocatorBinding]
Gets a web element binding.
Gets a web element binding.
- element
the name of the web element
- optional
true to return None if not found; false to throw error
-
def
getLocatorBinding(element: String): LocatorBinding
Gets a web element binding.
Gets a web element binding.
- element
the name of the web element
-
def
getStepDef(expression: String): Option[(Scenario, List[(String, String)])]
- Definition Classes
- EnvContext
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
interpolate(step: Step): Step
- Definition Classes
- EnvContext
-
final
def
interpolate(source: String)(resolve: (String) ⇒ String): String
- Definition Classes
- InterpolationSupport
-
val
isDryRun: Boolean
- Definition Classes
- EnvContext
-
def
isEvaluatingFeatureFile: Boolean
- Definition Classes
- EnvContext
-
def
isEvaluatingTopLevelStep: Boolean
- Definition Classes
- EnvContext
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
val
isParallel: Boolean
- Definition Classes
- EnvContext
-
val
isParallelFeatures: Boolean
- Definition Classes
- EnvContext
-
var
loadedMeta: List[File]
- Definition Classes
- EnvContext
-
lazy val
logger: Logger
- Attributes
- protected
- Definition Classes
- LazyLogging
- Annotations
- @transient()
-
def
matchTemplate(template: String, source: String, sourceName: String): Try[Boolean]
- Definition Classes
- TemplateSupport
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val options: GwenOptions
-
def
parseExpression(operator: String, expression: String): String
- Definition Classes
- EnvContext
-
def
perform(operation: ⇒ Unit): Option[Unit]
- Definition Classes
- Evaluatable
-
def
popBehavior(): Option[dsl.BehaviorType.Value]
- Definition Classes
- EnvContext
-
def
reset(level: dsl.StateLevel.Value): Unit
Resets the current context and closes the web browser.
Resets the current context and closes the web browser.
- Definition Classes
- WebEnvContext → EnvContext
-
def
scopes: ScopedDataStack
- Definition Classes
- EnvContext
-
def
specFile: Option[File]
- Definition Classes
- EnvContext
-
val
stateLevel: dsl.StateLevel.Value
- Definition Classes
- EnvContext
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
topScope: TopScope
- Definition Classes
- EnvContext
-
def
visibleScopes: ScopedDataStack
- Definition Classes
- EnvContext
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
val
webContext: WebContext
The web context.