Class SharedActionApp
SharedAction as keyword to be implemented by test automation Engineer.
Inherited Members
Namespace: AxaFrance.WebEngine.MobileApp
Assembly: AxaFrance.WebEngine.MobileApp.dll
Syntax
public abstract class SharedActionApp : SharedActionBase
Constructors
| Edit this page View SourceSharedActionApp()
Constructor with no runtime parameters given. Warning: Parameter Property of the Action must be assigned before running the test.
Declaration
protected SharedActionApp()
SharedActionApp(Variable[])
Constructor with giving runtime parameters (Test Data)
Declaration
protected SharedActionApp(Variable[] _parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| Variable[] | _parameters |
Fields
| Edit this page View SourceNativeAppContext
The NativeAppContext const = "NATIVE_APP".
Declaration
protected const string NativeAppContext = "NATIVE_APP"
Field Value
| Type | Description |
|---|---|
| string |
Methods
| Edit this page View SourceDoAction(AppiumDriver)
Implement DoAction() method to interact with your application (Click the links, Fill forms, Click buttons, ...) This action will be called if you are working on Android or IOS. Please note that if you test targets both Android and IOS, you should implement
Declaration
public abstract void DoAction(AppiumDriver driver)
Parameters
| Type | Name | Description |
|---|---|---|
| AppiumDriver | driver |
DoAction(object)
Run the implemented test script for the current test action (Keyword) using the Appium driver provited as context.
Declaration
public override void DoAction(object Context)
Parameters
| Type | Name | Description |
|---|---|---|
| object | Context | An AppiumDriver object, which refereces to an connection to the Mobile Application. |
Overrides
| Edit this page View SourceDoCheckpoint(AppiumDriver)
This method should be called after calling DoAction() Method in order to check whether the action is correctly running.
Declaration
public abstract bool DoCheckpoint(AppiumDriver driver)
Parameters
| Type | Name | Description |
|---|---|---|
| AppiumDriver | driver |
Returns
| Type | Description |
|---|---|
| bool | true if the check passed or false if the check failed |
Remarks
if the check cannot be run correctly, an exception will be thrown
DoCheckpoint(object)
Checkpoint is executed after the test script DoAction to verify if there are blocking errors.
Declaration
public override bool DoCheckpoint(object Context)
Parameters
| Type | Name | Description |
|---|---|---|
| object | Context | The current testing context, AppiumDriver. |
Returns
| Type | Description |
|---|---|
| bool | A bool value indicates if there are blocking errors.. |
Overrides
| Edit this page View SourceScreenshot()
Declaration
protected void Screenshot()
Screenshot(string)
Provide screen-shot in the report
Declaration
protected override void Screenshot(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name |
Overrides
| Edit this page View SourceSwitchContext(string)
For Hybird application, use this method to switch to one of WEBVIEW or switch back to NATIVE_APP.
Declaration
public void SwitchContext(string targetContext)
Parameters
| Type | Name | Description |
|---|---|---|
| string | targetContext | the prefix of the target context to switch. |
SwitchContext(string, int)
For Hybird application, use this method to switch to one of WEBVIEW or switch back to NATIVE_APP.
Declaration
public void SwitchContext(string targetContext, int timeout)
Parameters
| Type | Name | Description |
|---|---|---|
| string | targetContext | the prefix of the target context to switch. |
| int | timeout | Time to wait until the context is in the list |
SwitchToNativeApp()
For Hybird application, use this method to switch to NATIVE_APP context if you are working on Webview previously.
Declaration
public void SwitchToNativeApp()