Class GenericCommandExecutor
- java.lang.Object
-
- io.testproject.sdk.internal.helpers.GenericCommandExecutor
-
- All Implemented Interfaces:
ReportingCommandsExecutor
public final class GenericCommandExecutor extends java.lang.Object implements ReportingCommandsExecutor
A custom commands executor for Generic driver.
-
-
Field Summary
-
Fields inherited from interface io.testproject.sdk.internal.helpers.ReportingCommandsExecutor
LOG, STATE_SUCCESS
-
-
Constructor Summary
Constructors Constructor Description GenericCommandExecutor(AgentClient agentClient)Initializes a new instance of this an Executor restoring command/response codecs.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.openqa.selenium.remote.Responseexecute(org.openqa.selenium.remote.Command command, boolean skipReporting)Extended command execution method.AgentClientgetAgentClient()Getter forAgentClientinstance.java.util.concurrent.atomic.AtomicReference<java.lang.String>getCurrentTest()Getter for CURRENT_TEST field.io.testproject.sdk.internal.helpers.StashedCommandsgetStashedCommands()Getter for stashed commands hashmap.booleanisCommandReportsDisabled()Getter for commandReportsDisabled field.booleanisRedactionDisabled()Getter forredactionDisabledfield.booleanisReportsDisabled()Getter forreportsDisabledfield.booleanisTestAutoReportsDisabled()Getter fortestReportsDisabledfield.voidsetCommandReportsDisabled(boolean disable)Setter for commandReportsDisabled field.voidsetRedactionDisabled(boolean disable)Setter forredactionDisabledfield.voidsetReportsDisabled(boolean disable)Setter forreportsDisabledfield.voidsetTestAutoReportsDisabled(boolean disable)Setter fortestReportsDisabledfield.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.testproject.sdk.internal.helpers.ReportingCommandsExecutor
clearStash, extractResponse, inferTestName, reportCommand, reportCommand, reportTest
-
-
-
-
Constructor Detail
-
GenericCommandExecutor
public GenericCommandExecutor(AgentClient agentClient)
Initializes a new instance of this an Executor restoring command/response codecs.- Parameters:
agentClient- an instance ofAgentClientused to pen the original driver session.
-
-
Method Detail
-
execute
public org.openqa.selenium.remote.Response execute(org.openqa.selenium.remote.Command command, boolean skipReporting)Extended command execution method. Allows skipping reporting for "internal" commands, for example: - Taking screenshot for manual step reporting. - Inspecting element type to determine whether redaction is required.- Specified by:
executein interfaceReportingCommandsExecutor- Parameters:
command- Command to executeskipReporting- Flag to control reporting- Returns:
- Command execution response.
-
getAgentClient
public AgentClient getAgentClient()
Description copied from interface:ReportingCommandsExecutorGetter forAgentClientinstance.- Specified by:
getAgentClientin interfaceReportingCommandsExecutor- Returns:
- value of
AgentClientfield
-
getStashedCommands
public io.testproject.sdk.internal.helpers.StashedCommands getStashedCommands()
Description copied from interface:ReportingCommandsExecutorGetter for stashed commands hashmap.- Specified by:
getStashedCommandsin interfaceReportingCommandsExecutor- Returns:
- value of stashed commands hashmap.
-
isReportsDisabled
public boolean isReportsDisabled()
Getter forreportsDisabledfield.- Specified by:
isReportsDisabledin interfaceReportingCommandsExecutor- Returns:
- value of
reportsDisabledfield
-
setReportsDisabled
public void setReportsDisabled(boolean disable)
Setter forreportsDisabledfield.- Specified by:
setReportsDisabledin interfaceReportingCommandsExecutor- Parameters:
disable- True to disable or False to enable.
-
isCommandReportsDisabled
public boolean isCommandReportsDisabled()
Description copied from interface:ReportingCommandsExecutorGetter for commandReportsDisabled field.- Specified by:
isCommandReportsDisabledin interfaceReportingCommandsExecutor- Returns:
- value of commandReportsDisabled field
-
setCommandReportsDisabled
public void setCommandReportsDisabled(boolean disable)
Description copied from interface:ReportingCommandsExecutorSetter for commandReportsDisabled field.- Specified by:
setCommandReportsDisabledin interfaceReportingCommandsExecutor- Parameters:
disable- True to disable or False to enable.
-
isTestAutoReportsDisabled
public boolean isTestAutoReportsDisabled()
Getter fortestReportsDisabledfield.- Specified by:
isTestAutoReportsDisabledin interfaceReportingCommandsExecutor- Returns:
- value of
testReportsDisabledfield
-
setTestAutoReportsDisabled
public void setTestAutoReportsDisabled(boolean disable)
Setter fortestReportsDisabledfield.- Specified by:
setTestAutoReportsDisabledin interfaceReportingCommandsExecutor- Parameters:
disable- True to disable or False to enable.
-
isRedactionDisabled
public boolean isRedactionDisabled()
Getter forredactionDisabledfield.- Specified by:
isRedactionDisabledin interfaceReportingCommandsExecutor- Returns:
- value of
redactionDisabledfield
-
setRedactionDisabled
public void setRedactionDisabled(boolean disable)
Setter forredactionDisabledfield.- Specified by:
setRedactionDisabledin interfaceReportingCommandsExecutor- Parameters:
disable- True to disable or False to enable.
-
getCurrentTest
public java.util.concurrent.atomic.AtomicReference<java.lang.String> getCurrentTest()
Getter for CURRENT_TEST field.- Specified by:
getCurrentTestin interfaceReportingCommandsExecutor- Returns:
- value of CURRENT_TEST field
-
-