@testring/plugin-selenium-driver 0.6.14-alpha.3 → 0.6.14-alpha.4

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.
@@ -24,7 +24,7 @@ const DEFAULT_CONFIG = {
24
24
  clientCheckInterval: 5 * 1000,
25
25
  clientTimeout: 15 * 60 * 1000,
26
26
  port: 4444,
27
- logLevel: 'warn',
27
+ logLevel: 'error',
28
28
  capabilities: {
29
29
  browserName: 'chrome',
30
30
  'goog:chromeOptions': {
@@ -443,10 +443,11 @@ class SeleniumPlugin {
443
443
  yield this.createClient(applicant);
444
444
  const client = this.getBrowserClient(applicant);
445
445
  const args = stringifyWindowFeatures(windowFeatures);
446
- return client.newWindow(val, {
446
+ const newWindow = yield client.newWindow(val, {
447
447
  windowName: windowName || this.generateWinId(),
448
448
  windowFeatures: args,
449
449
  });
450
+ return (newWindow === null || newWindow === void 0 ? void 0 : newWindow.handle) || newWindow;
450
451
  });
451
452
  }
452
453
  waitForExist(applicant, xpath, timeout) {
@@ -539,7 +540,7 @@ class SeleniumPlugin {
539
540
  return __awaiter(this, void 0, void 0, function* () {
540
541
  yield this.createClient(applicant);
541
542
  const client = this.getBrowserClient(applicant);
542
- return client.switchToFrame(frameID);
543
+ return client.switchFrame(frameID.toString());
543
544
  });
544
545
  }
545
546
  frameParent(applicant) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testring/plugin-selenium-driver",
3
- "version": "0.6.14-alpha.3",
3
+ "version": "0.6.14-alpha.4",
4
4
  "main": "./dist/index.js",
5
5
  "typings": "./src/index.ts",
6
6
  "repository": {
@@ -11,12 +11,12 @@
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
13
  "@nullcc/code-coverage-client": "1.4.2",
14
- "@testring/child-process": "0.6.14-alpha.3",
15
- "@testring/devtool-extension": "0.6.14-alpha.3",
16
- "@testring/dwnld-collector-crx": "0.6.14-alpha.3",
17
- "@testring/logger": "0.6.14-alpha.3",
18
- "@testring/plugin-api": "0.6.14-alpha.3",
19
- "@testring/types": "0.6.14-alpha.3",
14
+ "@testring/child-process": "0.6.14-alpha.4",
15
+ "@testring/devtool-extension": "0.6.14-alpha.4",
16
+ "@testring/dwnld-collector-crx": "0.6.14-alpha.4",
17
+ "@testring/logger": "0.6.14-alpha.4",
18
+ "@testring/plugin-api": "0.6.14-alpha.4",
19
+ "@testring/types": "0.6.14-alpha.4",
20
20
  "@types/deepmerge": "2.2.3",
21
21
  "@types/node": "22.8.5",
22
22
  "@wdio/types": "9.2.2",
@@ -37,7 +37,7 @@ const DEFAULT_CONFIG: SeleniumPluginConfig = {
37
37
  clientCheckInterval: 5 * 1000,
38
38
  clientTimeout: 15 * 60 * 1000,
39
39
  port: 4444,
40
- logLevel: 'warn',
40
+ logLevel: 'error',
41
41
  capabilities: {
42
42
  browserName: 'chrome',
43
43
  'goog:chromeOptions': {
@@ -565,10 +565,11 @@ export class SeleniumPlugin implements IBrowserProxyPlugin {
565
565
  const client = this.getBrowserClient(applicant);
566
566
  const args = stringifyWindowFeatures(windowFeatures);
567
567
 
568
- return client.newWindow(val, {
568
+ const newWindow = await client.newWindow(val, {
569
569
  windowName: windowName || this.generateWinId(),
570
570
  windowFeatures: args,
571
571
  });
572
+ return newWindow?.handle || newWindow;
572
573
  }
573
574
 
574
575
  public async waitForExist(
@@ -673,8 +674,7 @@ export class SeleniumPlugin implements IBrowserProxyPlugin {
673
674
  public async frame(applicant: string, frameID: number) {
674
675
  await this.createClient(applicant);
675
676
  const client = this.getBrowserClient(applicant);
676
-
677
- return client.switchToFrame(frameID);
677
+ return client.switchFrame(frameID.toString());
678
678
  }
679
679
 
680
680
  public async frameParent(applicant: string) {
package/src/types.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Capabilities } from '@wdio/types';
2
2
 
3
- export type SeleniumPluginConfig = Capabilities.RemoteConfig & {
3
+ export type SeleniumPluginConfig = Capabilities.WebdriverIOConfig & {
4
4
  chromeDriverPath?: string;
5
5
  recorderExtension: boolean;
6
6
  clientCheckInterval: number;