Skip to content

Commit d11271b

Browse files
committed
feature added on 26 March 2026
1 parent 225589f commit d11271b

14 files changed

Lines changed: 1552 additions & 1058 deletions

File tree

src/helper/Helper.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11

2+
import { test } from "pw-api-plugin";
23
import { step } from "../utils/report/ReportAction";
34

45
export class Helper {
56
// Internal storage for locators
6-
const locatorStorage = new Map();
7+
locatorStorage = new Map();
78

89
/**
910
* The `delay` function is an asynchronous function that waits for a specified amount of time before
@@ -40,5 +41,12 @@ export class Helper {
4041
this.locatorStorage.clear();
4142
}
4243

44+
@step('getValueFromArray')
45+
getValueFromArray(testData:string[],preVal:string){
46+
const currentIndex = testData.indexOf(preVal);
47+
const nextIndex = currentIndex + 1%testData.length;
48+
return testData[nextIndex];
49+
}
50+
4351

4452
}

0 commit comments

Comments
 (0)