Skip to content

Commit

Permalink
Merge origin/master
Browse files Browse the repository at this point in the history
  • Loading branch information
vertigo17 committed Nov 29, 2024
2 parents 01a4ab0 + 2f05614 commit 0c6be40
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ public class TestCaseExecution {
private List<TestCaseExecutionFile> fileList;
// Host the list of Steps that will be executed (both pre tests and main test)
private List<TestCaseStepExecution> testCaseStepExecutionList;
private TestCaseStepExecution testCaseStepInExecution;
// Host the full list of data calculated during the execution.
private TreeMap<String, TestCaseExecutionData> testCaseExecutionDataMap;
// This is used to keep track of all property calculated within a step/action/control. It is reset each time we enter a step/action/control and the property name is added to the list each time it gets calculated. In case it was already asked for calculation, we stop the execution with FA message.
Expand Down Expand Up @@ -339,9 +340,20 @@ public TestCaseStepExecution getTestCaseStepExecutionBySortId(int sortID) {
}

public TestCaseStepExecution getTestCaseStepExecutionByStepId(int stepId) {
for (TestCaseStepExecution tcse : this.testCaseStepExecutionList) {
if (stepId == tcse.getTestCaseStep().getStepId()) {
return tcse;
TestCaseStepExecution tcsee = this.getTestCaseStepInExecution();
//If step executing if from library, return the step from the library instead
if (tcsee.isUsingLibraryStep()){
for (TestCaseStepExecution tcse : this.testCaseStepExecutionList) {
if (stepId == tcse.getTestCaseStep().getLibraryStepStepId()) {
return tcse;
}
}
return tcsee;
} else {
for (TestCaseStepExecution tcse : this.testCaseStepExecutionList) {
if (stepId == tcse.getTestCaseStep().getStepId()) {
return tcse;
}
}
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,7 @@ private TestCaseStepExecution executeStep(TestCaseStepExecution stepExecution, T
List<TestCaseStepAction> testCaseStepActionList = stepExecution.getTestCaseStep().getActions();
LOG.debug("{}Getting list of actions of the step. {} action(s) to perform.", logPrefix, testCaseStepActionList.size());

execution.setTestCaseStepInExecution(stepExecution);
for (TestCaseStepAction tcAction : testCaseStepActionList) {

// Start Execution of TestCaseStepAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ private boolean scrollDown(AppiumDriver driver, By element, int numberOfScrollDo
//Element found, perform another scroll to offset from middle of screen
int pressOffsetX = driver.manage().window().getSize().width / 2;
int pressOffsetY = driver.manage().window().getSize().height / 2;
scroll(driver, pressOffsetX, pressOffsetY, hOffset, vOffset);
scroll(driver, pressOffsetX, pressOffsetY, pressOffsetX-hOffset, pressOffsetY-vOffset);

return true;
} else {
Expand Down

0 comments on commit 0c6be40

Please sign in to comment.