ff-automationv2 2.2.17 → 2.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { Browser } from "../../core/types/browserType.js";
1
+ import { BrowserId } from "../../core/types/browserType.js";
2
2
  import { CloudConfig } from "../../core/interfaces/cloudConfigInterface.js";
3
3
  export declare class BrowserSession {
4
4
  private driver;
@@ -6,7 +6,7 @@ export declare class BrowserSession {
6
6
  private pageLoad;
7
7
  private cloudSessionInstances;
8
8
  private isCloud;
9
- constructor(browserName: Browser, isCloud: boolean | undefined, capabilities: Record<string, any> | undefined, pageLoad: number, CloudConfig: CloudConfig | undefined);
9
+ constructor(browserName: BrowserId, isCloud: boolean | undefined, capabilities: Record<string, any> | undefined, pageLoad: number, CloudConfig: CloudConfig | undefined);
10
10
  private openBrowser;
11
11
  open(): Promise<void>;
12
12
  close(): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { Browser } from "../../core/types/browserType";
1
+ import { BrowserName } from "../../core/types/browserType";
2
2
  export interface BrowserConfig {
3
- browserName: Browser;
3
+ browserName: BrowserName;
4
4
  }
@@ -3,11 +3,12 @@ import { MobileSession } from "../../automation/mobileSession/initiateMobileSess
3
3
  import { ElementGetter } from "../../fireflinkData/fireflinkLocators/getListOfLocators.js";
4
4
  import { ScriptDataAppender } from "../../fireflinkData/fireflinkScript/scriptGenrationData.js";
5
5
  import { DEFAULT_PAGE_LOAD } from "../constants/defaultValues.js";
6
+ import { browsers } from "../../core/types/browserType.js";
6
7
  export class ExecutionContext {
7
8
  constructor(request) {
8
9
  this.request = request;
9
10
  this.executor = null;
10
- this.session = new BrowserSession(request.browser.browserName, request.isCloud, request.capabilities, DEFAULT_PAGE_LOAD, request.cloudConfig);
11
+ this.session = new BrowserSession(browsers[request.browser.browserName], request.isCloud, request.capabilities, DEFAULT_PAGE_LOAD, request.cloudConfig);
11
12
  this.locator = new ElementGetter();
12
13
  this.scriptAppender = new ScriptDataAppender();
13
14
  this.androidSession = new MobileSession(request.appiumPort, request.isCloud, request.capabilities, request.cloudConfig);
@@ -1 +1,8 @@
1
- export type Browser = 'chrome' | 'firefox' | 'edge' | 'safari';
1
+ export declare const browsers: {
2
+ readonly "Microsoft Edge": "edge";
3
+ readonly "Google Chrome": "chrome";
4
+ readonly "Mozilla Firefox": "firefox";
5
+ readonly Safari: "safari";
6
+ };
7
+ export type BrowserName = keyof typeof browsers;
8
+ export type BrowserId = typeof browsers[BrowserName];
@@ -1 +1,6 @@
1
- export {};
1
+ export const browsers = {
2
+ "Microsoft Edge": "edge",
3
+ "Google Chrome": "chrome",
4
+ "Mozilla Firefox": "firefox",
5
+ "Safari": "safari"
6
+ };
@@ -1,5 +1,5 @@
1
- import { Browser } from "../../core/types/browserType";
2
- export declare function getCapabilities(browserName: Browser): {
1
+ import { BrowserId } from "../../core/types/browserType.js";
2
+ export declare function getCapabilities(browserName: BrowserId): {
3
3
  'goog:chromeOptions'?: {
4
4
  args: string[];
5
5
  } | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ff-automationv2",
3
- "version": "2.2.17",
3
+ "version": "2.2.18",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "This lib is used to automate the manual testcase",
@@ -1 +0,0 @@
1
- export {};
@@ -1,79 +0,0 @@
1
- import { AutomationRunner } from "../index.js";
2
- import path from "path";
3
- const runner = new AutomationRunner();
4
- runner.run({
5
- userStory: [
6
- ["Open browser"],
7
- ["Navigate to https://www.google.com/"],
8
- ["Maximize the browser"],
9
- // ["Navigate to https://www.google.com/"],
10
- // ["Maximize the browser"],
11
- // ["Navigate to https://www.google.com/"],
12
- // ["Maximize the browser"],
13
- // ["click on Gmail link"],
14
- ["Close browser"],
15
- // ["start iteration using 'Data1' Dataprovider"],
16
- // ["enter 'startIteration1' in search field"],
17
- // ["enter level-A in search field"],
18
- // ["start iteration using 'Data1' Dataprovider"],
19
- // ["enter 'startIteration1' in search field"],
20
- // ["enter level-B in search field"],
21
- // ["End iteration"],
22
- // ["End iteration"],
23
- // ["click on Gmail link"],
24
- // ["Close browser"],
25
- ],
26
- platform: "web",
27
- pageDetails: {
28
- Web: {
29
- pageId: "PAG73a7a0ad-c092-4351-8a93-68647f60e343",
30
- pageName: "ai-Page"
31
- }
32
- },
33
- broker: ["test3.fireflink.com:9092"],
34
- sslConfig: {
35
- rejectUnauthorized: false,
36
- ca: ["D:\Bitbucket\automationV2\Certificates\certificate.crt"]
37
- },
38
- sessionPath: path.join("D:", "Bitbucket", "automationV2"),
39
- serverHost: "test3",
40
- // topic: "",
41
- // serviceAccounts: "",
42
- webSocketId: "",
43
- generatedBy: "",
44
- licenseType: "C-Professional",
45
- licenseId: "LIC3985",
46
- userId: "USR26935",
47
- projectType: "Web",
48
- browser: {
49
- browserName: "chrome",
50
- },
51
- serverData: "https://test3.fireflink.com",
52
- version: "asdfg",
53
- type: "sdfg",
54
- scriptName: "url",
55
- scriptType: "web",
56
- projectId: "PJT1116",
57
- testCaseId: "SCR1208",
58
- promptId: "3f6e123c-8ec6-47c1-90e1-1a2f53b49251",
59
- userName: "default-user",
60
- appiumPort: 0,
61
- platformVersion: "",
62
- realDeviceId: "",
63
- isCloud: false,
64
- cloudConfig: {
65
- accessKey: "yfAa_w199cJge2Gezsgb2Jnu7hKdqER1tExY5kKvgSvXfi1lRUelFsbTFI5pMq7zQuwwNXXnsLTkjKhvWcKDWsUoGLi9KjUV6gbUNDhqj0jWYFyW9h_0LIDEg5qXigwZdqzQqAvWwHin3gBhzGndeROtixv_VFhnseGSWRAHTajZzE-Zl0d8BP6gl0TEBUfoNgqBtAQVDLP6wAQzPfcyjjGFsdHkXWeHFkKmA78D7rKlnNuN2WgjIUlhYheDRDeqZ98Ig_PyS1GbUvjwJ73L38sr_cD4Y9lrKyWJV-m5RmtKhmkqRM8uk5gEfjzgwy30",
66
- hostname: "devicefarm.fireflink.com",
67
- licenseId: "LIC2026658",
68
- projectName: "Project-6",
69
- protocol: "https",
70
- path: "backend/fireflinkcloud/wd/hub"
71
- },
72
- capabilities: {
73
- browserName: "chrome",
74
- platformName: "Windows 11",
75
- browserVersion: "146"
76
- },
77
- isTerminate: false,
78
- token: "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJRUFRfTnFuMkxxdDVmN09tOElWaW53dUJlR3ZVUUVBUkdxZkFuRHJxZU9NIn0.eyJleHAiOjE3NzUxMDczODIsImlhdCI6MTc3NTAyMDk4MiwianRpIjoib25ydHJvOmVkOGU3NzA4LTQ0OGUtNDdhZi05OTU0LWNjMWZkMzNlN2E1OCIsImlzcyI6Imh0dHA6Ly8xMDMuMTgyLjIxMC4yMjY6MzAxMDcvcmVhbG1zL0ZpcmVGbGluay10ZXN0MyIsImF1ZCI6InRhcmdldC1jbGllbnQiLCJzdWIiOiJmOmNhMzBmNDk3LTY1Y2YtNGU4Zi1iZGE3LTE0ZjM1NTNiYzZmNTpqYWlha2FzaEB5b3BtYWlsLmNvbSIsInR5cCI6IkJlYXJlciIsImF6cCI6ImZsaW5rLXNlcnZpY2UiLCJzaWQiOiIxOGExYWFiYy0xYzA5LTQ4YTMtOGJhMi01OThhYTc2MDkyZjYiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbIioiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbIm9mZmxpbmVfYWNjZXNzIiwidW1hX2F1dGhvcml6YXRpb24iXX0sInNjb3BlIjoiZW1haWwgcHJvZmlsZSIsImN1cnJlbnRMaWNlbnNlSWQiOiJMSUMzOTg1IiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJjdXJyZW50UHJpdmlsZWdlIjoiU3VwZXIgQWRtaW4iLCJmdWxsTmFtZSI6ImphaSIsImFjdGl2YXRpb25TdGF0dXMiOiJBQ1RJVkUiLCJwcml2aWxlZ2UiOiJTdXBlciBBZG1pbiIsImxpY2Vuc2VOYW1lIjoiRmlyZUZsaW5r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