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.
Inherited Members
Namespace: AxaFrance.WebEngine.Web
Assembly: AxaFrance.WebEngine.Web.dll
Syntax
public abstract class SharedActionWeb : SharedActionBase
Constructors
| Improve this Doc View SourceSharedActionWeb()
Constructor with no runtime parameters given. Warning: Parameter Property of the Action must be assigned before running the test.
Declaration
public SharedActionWeb()
SharedActionWeb(Variable[])
Constructor with giving runtime parameters (Test Data)
Declaration
public SharedActionWeb(Variable[] _parameters)
Parameters
Type | Name | Description |
---|---|---|
Variable[] | _parameters |
Properties
| Improve this Doc View SourceBrowser
The shared OpenQA.Selenium.IWebDriver object for the current Selenium test Action
Declaration
protected WebDriver Browser { get; set; }
Property Value
Type | Description |
---|---|
OpenQA.Selenium.WebDriver |
IsMobile
Gets an information whether the test is currently running on a mobile device.
Declaration
protected bool IsMobile { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceDoAction()
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()
DoAction(Object)
Run the current test action.
Declaration
public override void DoAction(object Context)
Parameters
Type | Name | Description |
---|---|---|
System.Object | Context | An WebDriver object |
Overrides
| Improve this Doc View SourceDoCheckpoint()
This method is called after DoAction in order to check whether the action is correctly running.
Declaration
public abstract bool DoCheckpoint()
Returns
Type | Description |
---|---|
System.Boolean | true if there is not blocking errors, otherwise: false |
Remarks
if the check cannot be run correctly, an exception will be thrown
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 |
---|---|---|
System.Object | Context | The current testing context. For Web testing, it is the Browser object. |
Returns
Type | Description |
---|---|
System.Boolean | A System.Boolean value indicates if the checkpoint is passed. |
Overrides
| Improve this Doc View SourceRunAccessibilityTest(String)
Runs an accessibility check on current location.
Declaration
public void RunAccessibilityTest(string pageName)
Parameters
Type | Name | Description |
---|---|---|
System.String | pageName | Name of the current page on report |
Screenshot()
Generates screenshot and add it in the test report.
Declaration
protected void Screenshot()
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. |
Screenshot(String)
Generates screenshot and add it in the test report.
Declaration
protected override void Screenshot(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the name of the screenshot |