Show / Hide Table of Contents

Class SharedActionWeb

SharedActionWeb implements privately the generic SharedActionBase interface and exposes new abstract methods The intention of add this level of abstraction is to make the WebEngine framework commun for other and no dependence.

Base class of all shared actions using Selenium. All shared actions must be derived from this class and implement DoAction, DoCheckpoint method.

In order to verify if all parameters are given when calling DoAction() and DoCheckpoint() methods, please specify RequiredParameters Property.

Inheritance
Object
SharedActionBase
SharedActionWeb
Inherited Members
SharedActionBase.UpdateTime
SharedActionBase.RequiredParameters
SharedActionBase.ActionReport
SharedActionBase.testCase
SharedActionBase.DoAction(Type, TestCase, Object, List<Variable>, ActionReport, Variable[])
SharedActionBase.DoAction(Type, Object, List<Variable>, ActionReport, Variable[])
SharedActionBase.DoAction(Type, Object, List<Variable>, Variable[])
SharedActionBase.DoActionWithCheckpoint(Type, Object, List<Variable>, ActionReport, Variable[])
SharedActionBase.DoActionWithCheckpoint(Type, Object, List<Variable>, SharedActionBase, Variable[])
SharedActionBase.GetParameter(IEnumerable<Variable>, String)
SharedActionBase.GetParameter(String)
SharedActionBase.Parameters
SharedActionBase.ContextValues
SharedActionBase.Information
SharedActionBase.GetType(String)
SharedActionBase.Global
SharedActionBase.ActionResult
SharedActionBase.Screenshots
Namespace: AxaFrance.WebEngine.Web
Assembly: AxaFrance.WebEngine.Web.dll
Syntax
public abstract class SharedActionWeb : SharedActionBase

Constructors

| Edit this page View Source

SharedActionWeb()

Constructor with no runtime parameters given. Warning: Parameter Property of the Action must be assigned before running the test.

Declaration
public SharedActionWeb()
| Edit this page View Source

SharedActionWeb(Variable[])

Constructor with giving runtime parameters (Test Data)

Declaration
public SharedActionWeb(Variable[] _parameters)
Parameters
Type Name Description
Variable[] _parameters

Properties

| Edit this page View Source

Browser

The shared OpenQA.Selenium.IWebDriver object for the current Selenium test Action

Declaration
protected WebDriver Browser { get; set; }
Property Value
Type Description
WebDriver
| Edit this page View Source

IsMobile

Gets an information whether the test is currently running on a mobile device.

Declaration
protected bool IsMobile { get; }
Property Value
Type Description
Boolean

Methods

| Edit this page View Source

DoAction()

Implement your test script in this method to interact with your application (Click the links, Fill forms, Click buttons, ...) Of course, you can do any actions needed.

Declaration
public abstract void DoAction()
| Edit this page View Source

DoAction(Object)

Run the current test action.

Declaration
public override void DoAction(object Context)
Parameters
Type Name Description
Object Context

An WebDriver object

Overrides
SharedActionBase.DoAction(Object)
| Edit this page View Source

DoCheckpoint()

This method is called after DoAction in order to check whether the action is correctly running.

Declaration
public abstract bool DoCheckpoint()
Returns
Type Description
Boolean

true if there is not blocking errors, otherwise: false

Remarks

if the check cannot be run correctly, an exception will be thrown

| Edit this page View Source

DoCheckpoint(Object)

Run the checkpoint after running DoAction() method to check if the value is

Declaration
public override bool DoCheckpoint(object Context)
Parameters
Type Name Description
Object Context

The current testing context. For Web testing, it is the Browser object.

Returns
Type Description
Boolean

A System.Boolean value indicates if the checkpoint is passed.

Overrides
SharedActionBase.DoCheckpoint(Object)
| Edit this page View Source

RunAccessibilityTest(String)

Runs an accessibility check on current location.

Declaration
public void RunAccessibilityTest(string pageName)
Parameters
Type Name Description
String pageName

Name of the current page on report

| Edit this page View Source

Screenshot()

Generates screenshot and add it in the test report.

Declaration
protected void Screenshot()
| Edit this page View Source

Screenshot(ElementDescription)

Generates screenshot on the given element and add it to the test report.

Declaration
protected void Screenshot(ElementDescription element)
Parameters
Type Name Description
ElementDescription element

The element which screenshot should be generated.

| Edit this page View Source

Screenshot(String)

Generates screenshot and add it in the test report.

Declaration
protected override void Screenshot(string name)
Parameters
Type Name Description
String name

the name of the screenshot

Overrides
SharedActionBase.Screenshot(String)
  • Edit this page
  • View Source
In this article
Back to top Copyright ® 2016-2024 AXA France, All rights reserved.