@applitools/eyes-selenium 4.59.5 → 4.60.0

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.
package/CHANGELOG.md CHANGED
@@ -8,6 +8,21 @@
8
8
 
9
9
 
10
10
 
11
+ ## 4.60.0 - 2022/10/4
12
+
13
+ ### Features
14
+ - Deprecated "Content" match level value in favor of "IgnoreColors"
15
+ - Added support for webview switching in classic execution
16
+ ### Bug fixes
17
+ - Fixed the issue with screenshots being taken on chrome-emulated devices
18
+ - Fixed bug when error was thrown when coded region wasn't found using selector
19
+
20
+ ## 4.59.6 - 2022/9/26
21
+
22
+ ### Features
23
+ ### Bug fixes
24
+ - Fixed minor issues
25
+
11
26
  ## 4.59.5 - 2022/9/22
12
27
 
13
28
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@applitools/eyes-selenium",
3
- "version": "4.59.5",
3
+ "version": "4.60.0",
4
4
  "description": "Applitools Eyes SDK for Selenium WebDriver",
5
5
  "keywords": [
6
6
  "eyes-selenium",
@@ -65,14 +65,14 @@
65
65
  }
66
66
  },
67
67
  "dependencies": {
68
- "@applitools/core": "1.0.3",
69
- "@applitools/eyes-api": "1.7.8",
70
- "@applitools/spec-driver-selenium": "1.3.22"
68
+ "@applitools/core": "1.1.3",
69
+ "@applitools/eyes-api": "1.8.2",
70
+ "@applitools/spec-driver-selenium": "1.4.4"
71
71
  },
72
72
  "devDependencies": {
73
- "@applitools/api-extractor": "1.2.9",
73
+ "@applitools/api-extractor": "1.2.11",
74
74
  "@applitools/bongo": "^2.2.0",
75
- "@applitools/scripts": "1.1.0",
75
+ "@applitools/scripts": "1.2.0",
76
76
  "@applitools/sdk-coverage-tests": "2.3.20",
77
77
  "@applitools/sdk-shared": "0.9.14",
78
78
  "@applitools/test-utils": "1.5.1",
@@ -80,16 +80,16 @@
80
80
  "@types/selenium-webdriver": "^4.1.1",
81
81
  "@typescript-eslint/eslint-plugin": "^5.27.0",
82
82
  "@typescript-eslint/parser": "^5.27.0",
83
- "chromedriver": "102",
83
+ "chromedriver": "105.0.1",
84
84
  "eslint": "^8.16.0",
85
85
  "eslint-config-prettier": "^8.5.0",
86
86
  "eslint-plugin-mocha-no-only": "^1.1.1",
87
87
  "eslint-plugin-node": "^11.1.0",
88
88
  "eslint-plugin-prettier": "^4.0.0",
89
89
  "husky": "^4.3.8",
90
- "mocha": "^10.0.0",
90
+ "mocha": "^9.2.2",
91
91
  "prettier": "^2.6.2",
92
- "selenium-webdriver": "^4.2.0",
92
+ "selenium-webdriver": "4.4.0",
93
93
  "spec-xunit-file": "0.0.1-3",
94
94
  "ttypescript": "^1.5.13",
95
95
  "typescript": "^4.7.2"
package/types/index.d.ts CHANGED
@@ -1,12 +1,6 @@
1
- export type Driver = {
2
- getExecutor(): {};
3
- __applitoolsBrand?: never;
4
- };
5
- export type Element = {
6
- getRect(): Promise<{ x: number; y: number; width: number; height: number; }>;
7
- __applitoolsBrand?: never;
8
- };
9
- export type Selector = ({ using: string; value: string; toObject(): Object; } | {} | ({ className: string; } | { css: string; } | { id: string; } | { js: string; } | { linkText: string; } | { name: string; } | { partialLinkText: string; } | { tagName: string; } | { xpath: string; }) | { using: string; value: string; } | ((webdriver: { getExecutor(): {}; }) => Promise<any>)) & { __applitoolsBrand?: never; };
1
+ export type Driver = import('selenium-webdriver').WebDriver & { __applitoolsBrand?: never; };
2
+ export type Element = import('selenium-webdriver').WebElement & { __applitoolsBrand?: never; };
3
+ export type Selector = (import('selenium-webdriver').By | import('selenium-webdriver').RelativeBy | import('selenium-webdriver').ByHash | { using: string; value: string; } | ((webdriver: import('selenium-webdriver').WebDriver) => Promise<any>)) & { __applitoolsBrand?: never; };
10
4
  export class Eyes {
11
5
  static setViewportSize: (driver: Driver, viewportSize: RectangleSize) => Promise<void>;
12
6
  constructor(runner?: EyesRunner, config?: ConfigurationPlain);
@@ -397,7 +391,7 @@ export class Configuration implements Required<ConfigurationPlain> {
397
391
  addBrowser(width: number, height: number, name?: BrowserTypePlain): Configuration;
398
392
  addDeviceEmulation(deviceName: DeviceNamePlain, screenOrientation?: ScreenOrientationPlain): Configuration;
399
393
  addMobileDevice(deviceName: AndroidDeviceNamePlain, screenOrientation: ScreenOrientationPlain, version?: AndroidVersionPlain): Configuration;
400
- addMobileDevice(deviceName: IosDeviceNamePlain, screenOrientation: ScreenOrientationPlain, version?: IosVersionPlain): Configuration;
394
+ addMobileDevice(deviceName: IosDeviceNamePlain, screenOrientation: ScreenOrientationPlain, version?: AndroidVersionPlain): Configuration;
401
395
  get visualGridOptions(): { [key: string]: any; };
402
396
  set visualGridOptions(visualGridOptions: { [key: string]: any; });
403
397
  getVisualGridOptions(): { [key: string]: any; };
@@ -459,6 +453,7 @@ export type CheckSettingsPlain = {
459
453
  timeout?: number;
460
454
  waitBeforeCapture?: number;
461
455
  lazyLoad?: boolean | { scrollLength?: number; waitingTime?: number; maxAmountToScroll?: number; };
456
+ webview?: string | boolean;
462
457
  };
463
458
  export class CheckSettings {
464
459
  constructor(settings?: CheckSettings | CheckSettingsPlain, spec?: { isElement(value: any): value is Element; isSelector(value: any): value is Selector; });
@@ -536,6 +531,7 @@ export class CheckSettings {
536
531
  timeout(timeout: number): CheckSettings;
537
532
  waitBeforeCapture(waitBeforeCapture: number): CheckSettings;
538
533
  lazyLoad(options?: boolean | { scrollLength?: number; waitingTime?: number; maxAmountToScroll?: number; }): CheckSettings;
534
+ webview(option?: string | boolean): CheckSettings;
539
535
  }
540
536
  export const Target: {
541
537
  window(): CheckSettings;
@@ -543,10 +539,11 @@ export const Target: {
543
539
  frame(context: { frame: number | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })); scrollRootElement?: Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }); }): CheckSettings;
544
540
  frame(frame: number | (Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })), scrollRootElement?: Element | (string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; })): CheckSettings;
545
541
  shadow(selector: string | Selector | { selector: string | Selector; type?: string; shadow?: EyesSelector<Selector>; frame?: EyesSelector<Selector>; }): CheckSettings;
542
+ webview(option?: string | boolean): CheckSettings;
546
543
  };
547
544
  export class BatchClose {
548
- static close(settings: { batchIds: Array<string>; serverUrl?: string; apiKey?: string; proxy?: ProxySettingsPlain; }): Promise<void>;
549
- constructor(options?: { batchIds: Array<string>; serverUrl?: string; apiKey?: string; proxy?: ProxySettingsPlain; });
545
+ static close(settings: { batchIds: Array<string>; serverUrl: string; apiKey: string; proxy?: ProxySettingsPlain; }): Promise<void>;
546
+ constructor(options?: { batchIds: Array<string>; serverUrl: string; apiKey: string; proxy?: ProxySettingsPlain; });
550
547
  close(): Promise<void>;
551
548
  setBatchIds(batchIds: Array<string>): BatchClose;
552
549
  setUrl(serverUrl: string): BatchClose;
@@ -737,19 +734,19 @@ export enum AndroidDeviceName {
737
734
  Xiaomi_Redmi_Note_11 = 'Xiaomi Redmi Note 11',
738
735
  Xiaomi_Redmi_Note_11_Pro = 'Xiaomi Redmi Note 11 Pro'
739
736
  }
740
- export type AndroidVersionPlain = "latest" | "latest-1" | "latest-2";
737
+ export type AndroidVersionPlain = "latest" | "latest-1";
741
738
  export enum AndroidVersion {
742
739
  LATEST = 'latest',
743
- ONE_VERSION_BACK = 'latest-1',
744
- TWO_VERSIONS_BACK = 'latest-2'
740
+ ONE_VERSION_BACK = 'latest-1'
745
741
  }
746
- export type MatchLevelPlain = "None" | "Layout1" | "Layout" | "Layout2" | "Content" | "Strict" | "Exact";
742
+ export type MatchLevelPlain = "None" | "Layout1" | "Layout" | "Layout2" | "Content" | "IgnoreColor" | "Strict" | "Exact";
747
743
  export enum MatchLevel {
748
744
  None = 'None',
749
745
  LegacyLayout = 'Layout1',
750
746
  Layout = 'Layout',
751
747
  Layout2 = 'Layout2',
752
748
  Content = 'Content',
749
+ IgnoreColor = 'IgnoreColor',
753
750
  Strict = 'Strict',
754
751
  Exact = 'Exact'
755
752
  }
@@ -1157,7 +1154,7 @@ export class Region implements Required<RegionPlain> {
1157
1154
  }
1158
1155
  export type DesktopBrowserInfo = { name?: BrowserTypePlain; width: number; height: number; };
1159
1156
  export type ChromeEmulationInfo = { chromeEmulationInfo: { deviceName: DeviceNamePlain; screenOrientation?: ScreenOrientationPlain; }; };
1160
- export type IOSDeviceInfo = { iosDeviceInfo: { deviceName: IosDeviceNamePlain; iosVersion?: IosVersionPlain; screenOrientation?: ScreenOrientationPlain; }; };
1157
+ export type IOSDeviceInfo = { iosDeviceInfo: { deviceName: IosDeviceNamePlain; iosVersion?: AndroidVersionPlain; screenOrientation?: ScreenOrientationPlain; }; };
1161
1158
  export type AndroidDeviceInfo = { androidDeviceInfo: { deviceName: AndroidDeviceNamePlain; version?: AndroidVersionPlain; screenOrientation?: ScreenOrientationPlain; }; };
1162
1159
  export type RunnerOptionsPlain = { testConcurrency?: number; };
1163
1160
  export class RunnerOptionsFluent {
@@ -1376,7 +1373,7 @@ export class Logger {
1376
1373
  tag(name: string, value: any): void;
1377
1374
  extend(label?: string): Logger;
1378
1375
  }
1379
- export function closeBatch(spec: { closeBatches(options: { settings: { batchIds: Array<string>; serverUrl?: string; apiKey?: string; proxy?: ProxySettingsPlain; }; }): Promise<void>; }): (options: { batchIds: Array<string>; serverUrl?: string; apiKey?: string; proxy?: ProxySettingsPlain; }) => Promise<void>;
1376
+ export function closeBatch(spec: BatchCloseSpec): (options: { batchIds: Array<string>; serverUrl: string; apiKey: string; proxy?: ProxySettingsPlain; }) => Promise<void>;
1380
1377
  export abstract class EyesRunner {
1381
1378
  getAllTestResults(throwErr?: boolean): Promise<TestResultsSummary>;
1382
1379
  }